15.02.2012, 21:51
8° Quando algum COP dб /su em algum player nгo aparece quem deu aparece assim :
"Nivel de procura : 3" ai depois se der mais /su aumenta
Coloca assim :
"Voce cometeu um crime ( [crime do /su] ) Denunciante : [NICK Player]
"Nivel de procura : 3" ai depois se der mais /su aumenta
Coloca assim :
"Voce cometeu um crime ( [crime do /su] ) Denunciante : [NICK Player]
PHP код:
//----------------------------------[SetCrim]-----------------------------------------------
if(strcmp(cmd, "/suspeito", true) == 0 || strcmp(cmd, "/su", true) == 0)
{
if(IsPlayerConnected(playerid))
{
/*if(!IsACop(playerid))
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo й um policial!");
return 1;
}*/
if(OnDuty[playerid] != 1)
{
SendClientMessage(playerid, COLOR_GREY, " Vocк nгo Bateu o cartгo!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: (/su)speito [id] [Descriзгo do Crime]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (IsACop(playerid))
{
if(IsPlayerConnected(giveplayerid))
{
/*if(IsACop(giveplayerid))
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo pode dar su em Policiais!");
return 1;
}*/
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: (/su)speito [id] [Descriзгo do Crime]");
return 1;
}
if(strcmp(result,"DOP",true) == 0) { result = "Desobediкncia a ordem policial"; }
if(strcmp(result,"dop",true) == 0) { result = "Desobediкncia a ordem policial"; }
if(strcmp(result,"TH",true) == 0) { result = "Tentativa de homicнdio"; }
if(strcmp(result,"th",true) == 0) { result = "Tentativa de homicнdio"; }
if(strcmp(result,"rp",true) == 0) { result = "Resistкncia a prisгo"; }
if(strcmp(result,"RP",true) == 0) { result = "Resistкncia a prisгo"; }
if(strcmp(result,"LP",true) == 0) { result = " Invasгo de Local Restrito";}
if(strcmp(result,"PIM",true) == 0) { result = "Porte Ilegal de Materiais ";}
if(strcmp(result,"PD",true) == 0) { result = "Porte de Drogas";}
if(strcmp(result,"CP",true) == 0) { result = "Cumplice de Crime";}
if(strcmp(result,"AFP",true) == 0) { result = "Agresгo Fisica ao um Policial";}
if(strcmp(result,"AP",true) == 0) { result = "Ajuste de Pena";}
if(strcmp(result,"ap",true) == 0) { result = "Ajuste de Pena";}
if(WantedPoints[giveplayerid] == 0) { WantedPoints[giveplayerid] = 3; }
else { WantedPoints[giveplayerid]+= 2; }
SetPlayerWantedLevel(playerid,2);
SetPlayerCriminal(giveplayerid,playerid, result);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Esse jogador nгo estб conectado.");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, " Vocк nгo й um Policial !");
}
}
return 1;
}