SA-MP Forums Archive
I need a /rob command - 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: I need a /rob command (/showthread.php?tid=363497)



I need a /rob command - farCry.xD - 27.07.2012

Hey , I need a rob command ..
This command need to rob a player with a random score and random cash when the player is at 1m distance..
Thx.


Re: I need a /rob command - Ranama - 27.07.2012

This is not scripting request thread...
and by the way that should not be that hard if you just think of what to do...
anyways here is how you do it xD:

You first need to check if the player is in range of the other player.
then you need to do a random value of what money you want them to be able to rob.
then you'll have to give the money to the other player.

That's how you do it, i think that you should be able to script that yourself.

otherwise go learn some scripting basics and read about some functions and you won't need to ask next time.


Respuesta: I need a /rob command - HarlemSAMP - 27.07.2012

As Ranama said, for checking the distance use ProxDetector (disire range)
You can also use GivePlayerMoney(giveplayerid, -(desire money to be stolen)
And GivePlayerMoney(playerid, (desire money to be taken.)

Something like that, CMD:rob and then start using your head :P


Re: I need a /rob command - Kakioshe22 - 27.07.2012

https://sampforum.blast.hk/showthread.php?tid=58401


Respuesta: I need a /rob command - farCry.xD - 28.07.2012

Thx.