27.01.2014, 22:17
Quando faz o comando, ele nгo cria nada na .ini do jogador, ele nunca cria, alguйm me ajuda ?
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", tmp);
dini_IntSet(conta, "Policial", 1); //LINHA QUE NГO SETA Policial = 1 na conta...
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!");
}
return 1;
}