new bool:Spawned[MAX_PLAYERS];
Spawned[playerid] = false;
C:\Users\yan\Desktop\SA-MP Server\gamemodes\DBv1.pwn(620) : error 033: array must be indexed (variable "Spawned") Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
{ if(Spawned == false) return SendClientMessage(playerid, -1, "{c3c3c3}(INFO) You can't use any commands while in lobby, Type /back."); }
CMD:lobby(playerid,params[]) { PlayerTotalKills[playerid] = 0; // variable that setts the current player's killing spree to 0. AFK[playerid] = false; AFK[playerid] = 0; new interiorID = GetPlayerInterior(playerid); new Float:health; GetPlayerHealth(playerid, health); if(health > 90) { SetPlayerPos(playerid, -975.975708,1060.983032,1345.671875); SetPlayerInterior(playerid,10); SetPlayerVirtualWorld(playerid,10); SetPlayerHealth(playerid, 9999); ResetPlayerWeapons(playerid); SendClientMessage(playerid, -1, "{EFB509}(INFO) You have teleported to the lobby! In order to go back use /back."); AFKTime[playerid] = false; } else { if(interiorID == 0) return SendClientMessage(playerid, -1, "{c3c3c3}(INFO) Atleast 90hp is required in order to go to lobby."); } { if(interiorID == 10) return SendClientMessage(playerid, -1, "{c3c3c3}You are already in the lobby! Use /back to return playing."); } { if(Spawned == false) return SendClientMessage(playerid, -1, "{c3c3c3}(INFO) You can't use any commands while in lobby, Type /back."); } return 1; }
Spawned == false
new bool:inLobby[128];
CMD:lobby(playerid,params[]) { PlayerTotalKills[playerid] = 0; // variable that setts the current player's killing spree to 0. AFK[playerid] = false; AFK[playerid] = 0; new interiorID = GetPlayerInterior(playerid); new Float:health; GetPlayerHealth(playerid, health); if(health > 90) { SetPlayerPos(playerid, -975.975708,1060.983032,1345.671875); SetPlayerInterior(playerid,10); SetPlayerVirtualWorld(playerid,10); SetPlayerHealth(playerid, 9999); ResetPlayerWeapons(playerid); SendClientMessage(playerid, -1, "{EFB509}(INFO) You have teleported to the lobby! In order to go back use /back."); AFKTime[playerid] = false; } else { if(interiorID == 0) return SendClientMessage(playerid, -1, "{c3c3c3}(INFO) Atleast 90hp is required in order to go to lobby."); } { if(interiorID == 10) return SendClientMessage(playerid, -1, "{c3c3c3}You are already in the lobby! Use /back to return playing."); } { if(inLobby == false) return SendClientMessage(playerid, -1, "{c3c3c3}(INFO) You can't use any commands while in lobby, Type /back."); } return 1; }
C:\Users\yan\Desktop\SA-MP Server\gamemodes\DBv1.pwn(621) : error 033: array must be indexed (variable "inLobby") Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
if(inLobby == false) return SendClientMessage(playerid, -1, "{c3c3c3}(INFO) You can't use any commands while in lobby, Type /back.");
if(inLobby[playerid] == false) return SendClientMessage(playerid, -1, "{c3c3c3}(INFO) You can't use any commands while in lobby, Type /back.");
new bool:inLobby[128]l
new bool:inLobby;
I've fixed it, I had to change the bool from;
Код:
new bool:inLobby[128]l Код:
new bool:inLobby; |
new bool:Spawned[MAX_PLAYERS];
new bool:Spawned;