28.01.2014, 17:36
(
Последний раз редактировалось FrostyWolf; 28.01.2014 в 18:43.
)
Tentei arrumar mas nгo sei se consegui, faзa um teste:
pawn Код:
if(strcmp(cmd, "/setarpolicial", true) == 0)
{
if(IsPlayerAdmin(playerid))
{
tmp = strtok(cmdtext, idx);
if (!strlen(tmp))
{
SendClientMessage(playerid, 0xC4C4FFAA, "Uso: /setarpolicial [id]");
return 1;
}
new id = strval(tmp);
if (!IsPlayerConnected(id))
{
SendClientMessage(playerid, COR_BRANCO, "(ERRO) Jogador nгo conectado!");
return 1;
}
new conta[128], str[256];
new comandante[MAX_PLAYER_NAME+1];
GetPlayerName(playerid, comandante, sizeof(comandante));
format(conta, sizeof(conta), "contas/usuarios/%s.ini", comandante); // Alterado
dini_IntSet(conta, "Policial", 1);
format(str, sizeof(str), "(INFO) Vocк setou o jogador %s de policial com sucesso!", nome(id));
SendClientMessage(playerid, 0xC0FF3EAA, str);
format(str, sizeof(str), "(INFO) O comandante %s setou vocк de policial, agora vocк pode pegar as profissхes da policia!", comandante);
SendClientMessage(playerid, 0xC0FF3EAA, str);
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "(ERRO) Vocк nгo й um comandante ou corregedor!");
}
}