21.05.2014, 04:13
pawn Код:
#include <a_samp>
#include <sscanf>
#include <zcmd>
new Wanted_Level[MAX_PLAYERS];
command(su, playerid, params[])
{
new id, crime, Name[120];
if(sscanf(params, "uu", id, crime))
{
SendClientMessage(playerid, 0xFFFFFFAA , "Use: /Su ID IDCrime" );
}
if (crime < 0 || crime > 20)
{
SendClientMessage(playerid, 0xFFFFFFAA, "Nгo existe crime com esse ID");
}
if(crime == 1 ) { Name = "Resistкncia a Prisгo" ; }
if(crime == 2 ) { Name = "Trafico de Drogas" ; }
if(crime == 3 ) { Name = "Trafico de Armas" ; }
if(crime == 4 ) { Name = "Tentativa de Homicнdeo" ; }
if(crime == 5 ) { Name = "Desacato a Ordem Policial" ; }
if(crime == 6 ) { Name = "Porte Ilegal de Armas" ; }
if(crime == 7 ) { Name = "Desacato" ; }
if(crime == 8 ) { Name = "Fuga a Abordagem Policial" ; }
if(crime == 9 ) { Name = "Vandalismo" ; }
if(crime == 10 ) { Name = "Roubo" ; }
if(crime == 11 ) { Name = "Roubo Seguido de Morte" ; }
if(crime == 12 ) { Name = "Agressгo" ; }
if(crime == 13 ) { Name = "Suborno" ; }
if(crime == 14 ) { Name = "Invasгo a Local Proibнdo" ; }
if(crime == 15 ) { Name = "Assalto" ; }
if(crime == 16 ) { Name = "Assalto Seguido de Morte" ; }
if(crime == 17 ) { Name = "Sequestro" ; }
if(crime == 18 ) { Name = "Sequestro Seguido de Morte" ; }
if(crime == 19 ) { Name = "Atentado Violento ao Pudф" ; }
if(crime == 20 ) { Name = "Direзгo Ofenciva" ; }
else
{
new Str[125];
new NCop [25];
GetPlayerName(playerid, NCop, 25);
format(Str, sizeof(Str), "Vocк cometeu um crime: %s. Acusador: %s", Name, NCop );
SendClientMessage(id, 0xFFFFFFAA, Str );
Wanted_Level[id] ++;
SetPlayerWantedLevel(id, Wanted_Level[id] );
}
return 1;
}
Pela lуgica creio que irб funcionar, mais se tiver algo errado alguйm comenta ai