
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!");
}
}
if(strcmp(cmd, "/procurar", true) == 0 || strcmp(cmd, "/su", true) == 0)
{
new id[128],Pname[24],Sname[24],str[128],Sstr[128];
GetPlayerName(playerid, Pname, sizeof(Pname));
format(Sstr, sizeof(Sstr), "Contas/%s.ini", Pname);
new prof = dini_Int(Sstr, "Profissao");
new admm = dini_Int(Sstr, "pAdm01");
if(prof == Policial_C || prof == Policial_F || prof == Recruta || prof == Bope || prof == Swat || prof == Rotam || prof == Policial_M || prof == FBI || prof == Interpol || admm == 1)
{
id = strtok(cmdtext, idx);
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;
if(!strlen(id) || !strlen(result)) return SendClientMessage(playerid, 0xFFD39BAA, "Use: /procurar [id] [motivo] ou /su [id] [motivo]");
if(IsPlayerConnected(strval(id)))
{
GetPlayerName(strval(id), Sname, sizeof(Sname));
format(str, sizeof(str), "{0099FF}[x]{CCCCFF} Vocк foi colocado na lista de procurados pelo Policial %s || Motivo: %s", Pname, result);
SendClientMessage(strval(id), 0xFFD39BAA, str);
format(str, sizeof(str), "{0099FF}[x]{CCCCFF} O Jogador %s, colocou %s na lista de procurados pelo motivo: %s!", Pname, Sname, result);
SendClientMessageToAll(0xFFD39BAA, str);
dini_IntSet(Sstr, "Procurado", dini_Int(Sstr, "Procurado")+1);
SetPlayerWantedLevel(strval(id), GetPlayerWantedLevel(strval(id))+1);
Procurados[strval(id)]++;
return 1;
}
else return SendClientMessage(playerid, 0xFFD39BAA, "(ERRO) Jogador nгo conectado no momento!");
}
else return SendClientMessage(playerid, 0xFFD39BAA, "(ERRO) Vocк nгo pode usar esse comando!");
}

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!");
return true;
}
C:\Documents and Settings\Vinнcius\Desktop\New Virtual City\gamemodes\NVC.pwn(10253) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
|
entгo quer dizer que o seu comando ta funcionadno certissimo nй ?
Deu error: e outra coisa apareзe assim O jogador 0, colocou o jogador Fulano pelo motivo: teste. tinha que ser o Jogador fulano, colocou na lista de procurados o Fulano pelo motivo>: teste pawn Код:
|
??