//Put this under /levelup command
for(new i=0; i < MAX_PLAYERS; i++)
{
//level up function, example:
LevelUp(i); //this will level up all players in server, which are "marked" with "i"
}
//-------------------------------[LevelUp]-------------------------------------------------------------------------- if (strcmp(cmd, "/levelupall", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] >= 1337) { if (gPlayerLogged[playerid] != 0) { for(new i=0; i < MAX_PLAYERS; i++) { //level up function, example: LevelUp(i); //this will level up all players in server, which are "marked" with "i" }
if(strcmp(cmd, "/levelupall", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 1337)
{
if(gPlayerLogged[playerid] == 1)
{
for(new i=0; i < MAX_PLAYERS; i++)
{
//level up function
}
}
}
}
return 1;
}
if(strcmp(cmd, "/levelupall", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 1337)
{
if(gPlayerLogged[playerid] == 1)
{
for(new i=0; i < MAX_PLAYERS; i++)
{
PlayerInfo[i][pAdmin] ++;
}
}
}
}
return 1;
}
if (strcmp(cmd, "/levelupall", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] >= 1337)
{
if (gPlayerLogged[playerid] != 0)
{
for(new g_Players = 0; g_Players < MAX_PLAYERS; g_Players++)
{
//Your level up function, if you're using Godfather, which I'm assuming you are:
PlayerInfo[g_Players][pLevel]++;
}
else return 0; //Not logged in.
}
else return 0; //Not authorized to use this.
return 1;
}
pawn Код:
|
if (strcmp(cmd, "/lvlup", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] >= 1337) { if(gPlayerLogged[playerid] == 1) { for(new i=0; i < MAX_PLAYERS; i++) { PlayerInfo[i][pAdmin] ++; } } } } return 1; }
Код:
if (strcmp(cmd, "/lvlup", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pAdmin] >= 1337) { if(gPlayerLogged[playerid] == 1) { for(new i=0; i < MAX_PLAYERS; i++) { PlayerInfo[i][pAdmin] ++; } } } } return 1; } |