23.10.2012, 12:42
hello, i creating my own server, and i have problem: this is script:
and when i type /stunt also InStunt == 1 , thats is not problem.
problem is with dcmd_player:
when i go in /stunt and type /player , server is writing "you are not in zone" but when i InDrag /player cmd is working.
before when there was no bool:InDm, then its ok, bet when i put in the gm InDm, then the problems started, plz help with this.
Код:
new bool:InDrag[MAX_PLAYERS]; new bool:InDm[MAX_PLAYERS]; new bool:InStunt[MAX_PLAYERS]; #define IsAnywhere(%0) \ ( InDrag [ %0 ], InStunt [ %0 ], InDm [ %0 ] )
problem is with dcmd_player:
Код:
dcmd_player(playerid, params[]) { #pragma unused params if ( !IsAnywhere ( playerid ) ) return SendClientMessage(playerid, RED, "you are not in zone."); if(IsPlayerInAnyVehicle(playerid)) { RemovePlayerFromVehicle(playerid); SetPlayerVirtualWorld(playerid, 0); InDrag[playerid] = false; InDm[playerid] = false; InStunt[playerid] = false; TextDrawHideForPlayer(playerid, stunttd); TextDrawHideForPlayer(playerid, DMtd); DisablePlayerRaceCheckpoint(playerid); SpawnPlayer(playerid); } else { SetPlayerVirtualWorld(playerid, 0); InDrag[playerid] = false; InDm[playerid] = false; InStunt[playerid] = false; TextDrawHideForPlayer(playerid, stunttd); TextDrawHideForPlayer(playerid, DMtd); DisablePlayerRaceCheckpoint(playerid); SpawnPlayer(playerid); } return 1; }
before when there was no bool:InDm, then its ok, bet when i put in the gm InDm, then the problems started, plz help with this.