30.01.2013, 12:50
Aparentemente vocк se confundiu com plid e playerid
pawn Код:
if(!strcmp(cmd, "/documentos", true)) {
new tmp[128]; tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GREEN, "Use /documentos [id].");
new plid = strval(tmp);
if(!IsPlayerConnected(plid)) return SendClientMessage(playerid, Vermelho, "(ERRO) ID invбlido");
new pname[MAX_PLAYER_NAME]; GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
new aname[MAX_PLAYER_NAME]; GetPlayerName(plid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), PASTA_CONTAS, aname);
new string_[50]; format(string_, sizeof(string_), "» Documentos de: %s", aname); SendClientMessage(playerid, 0x4E9C9CAA, string_);
format(string, sizeof(string), "» Skin nъmero: %d", dini_Int(file, "Skin")); SendClientMessage(playerid, 0xFFFFFFAA, string);
if(dini_Int(file, "HabTerrestre") == 1) SendClientMessage(playerid, 0xFFFFFFAA, "» Habilitaзгo Terrestre: Sim");
if(dini_Int(file, "HabTerrestre") == 0) SendClientMessage(playerid, 0xFFFFFFAA, "» Habilitaзгo Terrestre: Nгo");
if(dini_Int(file, "HabNautica") == 1) SendClientMessage(playerid, 0xFFFFFFAA, "» Habilitacao Nбutica: Sim");
if(dini_Int(file, "HabNautica") == 0) SendClientMessage(playerid, 0xFFFFFFAA, "» Habilitaзгo Nбutica: Nгo");
if(dini_Int(file, "HabAerea") == 1) SendClientMessage(playerid, 0xFFFFFFAA, "» Habilitaзгo Aйrea: Sim");
if(dini_Int(file, "HabAerea") == 0) SendClientMessage(playerid, 0xFFFFFFAA, "» Habilitaзгo Aйrea: Nгo");
if(dini_Int(file, "Porte") == 1) SendClientMessage(playerid, 0xFFFFFFAA, "» Porte de Armas: Sim");
if(dini_Int(file, "Porte") == 0) SendClientMessage(playerid, 0xFFFFFFAA, "» Porte de Armas: Nгo");
format(string, sizeof(string), "(INFO) Documentos mostrados para %s.", pname); SendClientMessage(plid, 0x4E9C9CAA, string);
format(string, sizeof(string), "(INFO) %s lhe mostrou seus documentos!", aname); SendClientMessage(playerid, 0x4E9C9CAA, string);
return 1;
}