16.12.2012, 14:29
If you only modify a native than do it like that
Otherwise just do it like that
pawn Код:
native Freeze(playerid, bool: toggle = false) = TogglePlayerControllable;
native UnFreeze(playerid, bool: toggle = true) = TogglePlayerControllable;
pawn Код:
/*
native Freeze(playerid);
native UnFreeze(playerid);
*/
static
bool: gPlayerFrozen[MAX_PLAYERS char]
;
stock bool: IsPlayerFrozen(playerid) {
return gPlayerFrozen{playerid};
}
stock Freeze(playerid) {
return TogglePlayerControllable(playerid, (gPlayerFrozen{playerid} = false));
}
stock UnFreeze(playerid) {
return TogglePlayerControllable(playerid, (gPlayerFrozen{playerid} = true));
}