/arrest command...Some help please? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /arrest command...Some help please? (
/showthread.php?tid=106779)
/arrest command...Some help please? -
Nikos12 - 05.11.2009
I have spent hours of searching but i cannot make an arrest command

Can someone help me pls? I would appreciate it
Re: /arrest command...Some help please? -
Lajko1 - 05.11.2009
damn its so easy to make it

i think so, i am doing on my own /ar command too and its going nice to me

i can give you some part of it
Код:
if ((strcmp("/ar", cmd, true) == 0) || (strcmp(cmd, "/arrest", true) == 0))
{
new tmp[256];
tmp = strtok(cmdtext, idx);
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
giveplayerid = strval(tmp);
if(!strlen(tmp)) {
SendClientMessage(playerid,0xFF0000AA, "USAGE: /Ar [Playerid] / [Player Name]");
return 1;
}
if(!IsPlayerConnected(giveplayerid))
{
SendClientMessage(playerid,0xFF0000AA,"ERROR: Invaild ID!");
return 1;
}
if(GetPlayerWantedLevel(playerid) >= 4)
{
format(string, sizeof(string), "You Have Been Arrested by Officer %s[%d]!",playername,playerid);
SendClientMessage(giveplayerid,0x33CCFFAA,string);
format(string, sizeof(string), "~r~BUSTED!");
GameTextForPlayer(giveplayerid,string,3000,5);
format(string, sizeof(string), "You Arrested %s[%d], You Get $2500!",playername,giveplayerid);
SendClientMessage(playerid,0x33CCFFAA,string);
format(string, sizeof(string), "Suspect %s[%d] Has Been Arrested By Officer %s[%d].",playername,giveplayerid,playername,playerid);
SendClientMessageToAll(0x33CCFFAA,string);
format(string, sizeof(string), "~b~WELL DONE!");
GameTextForPlayer(playerid,string,3000,5);
GivePlayerMoney(playerid,2500);
SetPlayerScore(playerid,1);
SetPlayerSpecialAction(giveplayerid,SPECIAL_ACTION_HANDSUP);
ResetPlayerWeapons(giveplayerid);
}
return 1;
}
return 0;
}
its not 100% complete as you see but it will be soon
Re: /arrest command...Some help please? -
Nikos12 - 05.11.2009
thank you for your help i hope i cn make this.