14.07.2012, 20:12
Bom esse comadno estб bugado, pq qnd eu tento /procurar dб 2 mensagens (erro) ESSE JOGADOR NГO ESTБ CONECTADO e a comando inexistente.
se puderem me ajudar, fico grato:
Abaixo uma imagem mostrando o error:
Obs: apareceu duas vezes pq digitei duas vezes o /su

Cуdigo:
se puderem me ajudar, fico grato:
Abaixo uma imagem mostrando o error:
Obs: apareceu duas vezes pq digitei duas vezes o /su

Cуdigo:
pawn Код:
if(strcmp(cmd, "/procurar", true) == 0 || strcmp(cmd, "/su", true) == 0)
{
format(file, sizeof(file), "scriptfiles/Contas/%s.ini", playerid);
if(dini_Int(file, "Profissao") == Policial_C || dini_Int(file, "Profissao") == Policial_F || dini_Int(file, "Profissao") == Recruta || dini_Int(file, "Profissao") == Bope || dini_Int(file, "Profissao") == Swat || dini_Int(file, "Profissao") == Rotam || dini_Int(file, "Profissao") == Policial_M || dini_Int(file, "Profissao") == FBI || dini_Int(file, "Profissao") == Interpol || dini_Int(file, "pAdm01") == 1)
{
new tmp[256];
tmp = strtok(cmdtext, idx);
new plid;
plid = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0xFFD39BAA, "Use: /procurar [id] [motivo] ou /su [id] [motivo]");
return 1;
}
if(IsPlayerConnected(plid))
{
new str[128];
new giveplayer[MAX_PLAYER_NAME];
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(plid, giveplayer, sizeof(giveplayer));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[100];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
format(str, sizeof(str), "{0099FF}[x]{CCCCFF} Vocк foi colocado na lista de procurados pelo Policial %s || Motivo: %s", sendername, (result));
SendClientMessage(plid, 0xFFD39BAA, str);
format(str, sizeof(str), "{0099FF}[x]{CCCCFF} O Jogador %s, colocou %s na lista de procurados pelo motivo: %s!", playerid, giveplayer, (result));
SendClientMessageToAll(0xFFD39BAA, str);
new antes;
antes=dini_Int(file, "Procurado");
dini_IntSet(file, "Procurado", antes+1);
SetPlayerWantedLevel(plid, GetPlayerWantedLevel(plid)+1);
Procurados[plid]++;
return 1;
}
else
{
SendClientMessage(playerid, 0xFFD39BAA, "(ERRO) Jogador nгo conectado no momento!");
}
}
else
{
SendClientMessage(playerid, 0xFFD39BAA, "(ERRO) Vocк nгo pode usar esse comando!");
}
}




??