NoobPlayer
Новичок
- 7
- 0
Код покажи
PHP:
#include <Pawn.RakNet>
new bool: inv[MAX_PLAYERS];
public OnGameModeInit() {
PR_RegHandler(207, "OnPlayerOnfootSync", PR_EventType: PR_INCOMING_PACKET);
return 1;
}
forward OnPlayerOnfootSync(playerid, BitStream: bs);
public OnPlayerOnfootSync(playerid, BitStream: bs) {
if(inv[playerid]) Invisible_HidePlayer(playerid, bs);
}
Invisible_HidePlayer(playerid, BitStream: bs) {
static Float: X,
Float: Y,
Float: Z;
BS_SetReadOffset(bs, 56);
BS_ReadFloat(bs, X);
BS_ReadFloat(bs, Y);
BS_ReadFloat(bs, Z);
BS_SetWriteOffset(bs, 0);
BS_WriteUint8(bs, 212);
BS_WriteUint16(bs, 0);
BS_WriteUint16(bs, 0);
BS_WriteUint16(bs, 0);
BS_WriteFloat(bs, X);
BS_WriteFloat(bs, Y);
BS_WriteFloat(bs, Z);
return 1;
}
CMD:setinv(playerid) {
inv[playerid] = !inv[playerid];
SendClientMessage(playerid, -1, (inv[playerid]) ? (!"Инвиз Включен") : (!"Инвиз выключен"));
return 1;
}
Последнее редактирование: