29.06.2011, 22:59
Tenta \/
@ EDIT
Ai editei se tiver tentado tenta de novo
pawn Код:
if(!strcmp(cmd, "/setadmin", true))
{
new Level;
new Sjim[256];
new name[MAX_PLAYER_NAME];
new names[MAX_PLAYER_NAME];
if(!IsPlayerAdmin(playerid) && PlayerInfo[playerid][Admin] < 5)
{
SendClientMessage(playerid, 0xFC4430AA, "¤ Vocк nгo й administrador logado na RCON !");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0xFF6F28AA, "¤ Uso correto: /setaradmin [id] [level]");
return 1;
}
new para1;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0xFF6F28AA, "¤ Uso correto: /setaradmin [id] [level]");
return 1;
}
Level = strval(tmp);
if(Level < 0 || Level > 5) return SendClientMessage(playerid, 0xFFFF00AA, "¤ Somente level de administrador entre 1 e 5!");
GetPlayerName(para1, name, sizeof(name));
GetPlayerName(playerid, names, sizeof(names));
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
format(Sjim, sizeof(Sjim), "¤ Vocк deu б %s (ID:%d), level %d de administrador.", name, para1, Level);
SendClientMessage(playerid, 0x00A400AA, Sjim);
format(Sjim, sizeof(Sjim), "¤ [PROMOVIDO] O Administrador %s lhe deu Level %d de Administrador!", names, Level);
SendClientMessage(para1, 0x00FF00AA, Sjim);
GameTextForPlayer(para1, "~p~PROMOVIDO!", 5000, 0);
PlayerInfo[para1][Admin] = Level;
format(file, sizeof(file), "Contas/%s.ini", name);
if(!dini_Exists(file))
{
dini_Create(file);
dini_IntSet(file, "Level", Level);
}
else
{
dini_IntSet(file, "Level", Level);
PlayerInfo[para1][Admin] = Level;
}
return 1;
}
return 1;
}
else
{
SendClientMessage(playerid, 0xFC4430AA, "¤ (ERRO) Jogador nгo conectado!");
return 1;
}
}
Ai editei se tiver tentado tenta de novo