if(strcmp(cmd, "/spawn", true) == 0)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
new plid;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COR_BRANCO, "[x] Digite: /spawn [id]");
return 1;
}
plid = strval(tmp);
if(IsPlayerConnected(plid)) {
SpawnPlayer(plid);
new pname[MAX_PLAYER_NAME];
GetPlayerName(plid, pname, MAX_PLAYER_NAME);
format(string, sizeof(string), "{FBFF00}[INFO] O admin {FF0000}%s (%d) {FBFF00}deu spawn em %s (%d)!", aname,playerid,pname,plid);
SendMessageToAdmins(-1, string);
return 1;
}
else {
SendClientMessage(playerid, -1, "ID invбlido");
return 1;
}
}
if(strcmp(cmd, "/spawn", true) == 0) {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COR_BRANCO, "[x] Digite: /spawn [id]");
return 1;
}
new plid;
plid = strval(tmp);
if(IsPlayerConnected(plid)) {
SpawnPlayer(plid);
format(string, sizeof(string), "{FBFF00}[INFO] O admin {FF0000}%s (%d) {FBFF00}deu spawn em %s (%d)!", NomePlayer(playerid),playerid,NomePlayer(plid),plid);
MADM4(-1, string);
return true;
}
else {
SendClientMessage(playerid, -1, "ID invбlido");
return true;
}
return true;
}
static stock NomePlayer(playerid) {
static np[MAX_PLAYER_NAME+1];
GetPlayerName(playerid, np, sizeof(np));
return np;
}
static stock MADM4(const cor, const msg[]) {
for(new p = 0; p < MAX_PLAYERS+1; ++p) {
if(!IsPlayerAdmin(playerid)) continue;
if(PlayerInfo[i][pAdmin] > 4) continue;
SendClientMessage(i, cor, msg);
}
return true;
}
if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid, COR_BRANCO, "Vocк nгo estб conetado!");
if(LevelInfo[playerid][Admin] < 1) return SendClientMessage(playerid, COLOR_WARNING, "[ERRO] Vocк nгo tem permissгo para executar este comando.");
if(AdminTrabalhando[playerid] < 1) return SendClientMessage(playerid, COR_BRANCO, "Vocк nгo estб trabalhando (/trabalhar)");
static stock MADM4(const cor, const msg[]) {
for(new p = 0; p < MAX_PLAYERS+1; ++p) {
if(!IsPlayerAdmin(playerid)) continue;
if(PlayerInfo[i][pAdmin] > 4) continue;
SendClientMessage(i, cor, msg);
}
return true;
}
static stock MADM4(cor, const msg[]) {
for(new p = 0; p < MAX_PLAYERS+1; ++p) {
if(!IsPlayerAdmin(playerid)) continue;
if(LevelInfo[playerid][Admin] < 4) {
SendClientMessage(i, cor, msg);
}
}
return true;
}
forward MSGAdmin(color, string[]);
public MSGAdmin(color, string[])
{
for(new i = 0; i< MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(LevelInfo[playerid][Admin] >= 1)
{
SendClientMessage(i, color, string);
}
}
}
}
if(strcmp(cmd, "/spawn", true) == 0)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
new plid;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COR_BRANCO, "[x] Digite: /spawn [id]");
return 1;
}
plid = strval(tmp);
if(IsPlayerConnected(plid)) {
SpawnPlayer(plid);
new pname[MAX_PLAYER_NAME];
GetPlayerName(plid, pname, MAX_PLAYER_NAME);
format(string, sizeof(string), "{FBFF00}[INFO] O admin {FF0000}%s (%d) {FBFF00}deu spawn em %s (%d)!", aname,playerid,pname,plid);
MSGAdmin(-1, string);
return 1;
}
else {
SendClientMessage(playerid, -1, "ID invбlido");
return 1;
}
}
if(LevelInfo[playerid][Admin] >= 1)
(1329) : error 017: undefined symbol "playerid"
pawn Код:
|
if(LevelInfo[playerid][Admin] >= 1)
if(LevelInfo[i][Admin] >= 1)