24.01.2018, 04:33
Quote:
|
I can not understand show me an example of the function please.
|
Код:
new isdisabled=0;
cmd:disablefist() {
disabled=1;
SetPlayerDisableKeysSync(playerid, KEY_FIRE);
return 1;
}
IPacket:PLAYER_SYNC(playerid, BitStream:bs)
{
new onFootData[PR_OnFootSync];
BS_IgnoreBits(bs, 8);
BS_ReadOnFootSync(bs, onFootData);
if(isdisabled&&GetPlayerWeapon(playerid)==0) {
ProcessDisabledKeys(playerid, onFootData[PR_lrKey], onFootData[PR_udKey], onFootData[PR_keys]);
}
BS_SetWriteOffset(bs, 8);
BS_WriteOnFootSync(bs, onFootData);
return 1;
}

