Help script /rob /ar nearest player - 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)
+--- Thread: Help script /rob /ar nearest player (
/showthread.php?tid=533892)
Help script /rob /ar nearest player -
AmirRFCNR - 26.08.2014
Het Guys
pls can someone make me a /rob and /arrest nearest player Script
i'm using sscanf and zcmd
thanks
Re: Help script /rob /ar nearest player -
billy123321 - 27.08.2014
Can we get some info on what variables you're using that would affect these commands? Such as how you're detecting wanted levels or how much money you want people to do be able to rob.
Re: Help script /rob /ar nearest player -
Pottus - 27.08.2014
This section is for help dude not for people to write you scripts.
Re: Help script /rob /ar nearest player -
Steel_ - 27.08.2014
https://sampforum.blast.hk/showthread.php?tid=41161
Re: Help script /rob /ar nearest player -
Ox1gEN - 27.08.2014
This ~!WAS NOT!~ tested but should work correctly.
If a player is in range of 4 meters within another player it'll cuff him, otherwise it'll write that no one's there.
CODE:
Код:
CMD:arrest(playerid, params[])
{
new Float:x, Float:y, Float:z;
for(new i = 0; i < MAX_PLAYERS; i++)
{
GetPlayerPos(playerid, x, y, z);
if(IsPlayerInRangeOfPoint(i, 4,x, y, z))
{
SetPlayerSpecialAction(i, SPECIAL_ACTION_CUFFED);
SetPlayerAttachedObject(i, 0, 19418, 6, -0.027999, 0.051999, -0.030000, -18.699926, 0.000000, 104.199928, 1.489999, 3.036000, 1.957999);
EditAttachedObject(i, 0);
}
else
{
SendClientMessage(playerid, -1, "There's no one around you!");
}
}
return 1;
}