//---------------------------------------------------------------<[Giveallevel]>----------------------------------------------------------------------// if(strcmp(cmd, "/givelevelall", true) == 0) { if (PlayerInfo[playerid][pAdmin] >= 6) { for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { new playerlevel = PlayerInfo[pLevel]; PlayerInfo[pLevel] = playerlevel + 1; format(string, sizeof(string), " Administrator %s gave up 1 level all players who are online",sendername); SendClientMessage(i,COLOR_LIGHTGREEN,string); } } return 1; } else { SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command !"); } }
C:\Documents and Settings\Carbon\Desktop\larp.pwn(58017) : error 033: array must be indexed (variable "-unknown-") C:\Documents and Settings\Carbon\Desktop\larp.pwn(58018) : warning 217: loose indentation C:\Documents and Settings\Carbon\Desktop\larp.pwn(58018) : error 033: array must be indexed (variable "PlayerInfo")
PlayerInfo[pLevel] = playerlevel + 1;
//---------------------------------------------------------------<[Giveallevel]>----------------------------------------------------------------------//
if(strcmp(cmd, "/givelevelall", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] >= 6)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
PlayerInfo[i][pLevel] ++;
format(string, sizeof(string), " Administrator %s gave up 1 level all players who are online",sendername);
return SendClientMessageToAll(COLOR_LIGHTGREEN, string);
}
}
}
return 1;
}
pawn Код:
|
//---------------------------------------------------------------<[Giveallevel]>----------------------------------------------------------------------//
if(strcmp(cmd, "/givelevelall", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] >= 6)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayerInfo[i][pLevel]++;
}
new string[128];
format(string, sizeof(string), " Administrator %s gave up 1 level all players who are online",sendername);
SendClientMessageToAll(COLOR_LIGHTGREEN, string);
}
return 1;
}