I need a /rob command
#1

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.
Reply
#2

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.
Reply
#3

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
Reply
#4

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

Thx.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)