SA-MP Forums Archive
Randomising... - 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: Randomising... (/showthread.php?tid=618540)



Randomising... - StrikerZ - 07.10.2016

Hey. Is there any way to randomise money? Like if someone robbed a player/store the money he robbed will be randomised. How can i do that?


Re: Randomising... - Mencent - 07.10.2016

Hello.

You must work with the function random.
PHP код:
new money random(20000)+1
The Money will get a value between 1 and 20000.


Re: Randomising... - StrikerZ - 07.10.2016

How can i create a character [a type of player which stands]?. I'm going to create a system in which a player aims at a character and will press Y and a dialog will show. All i want to know is how to create that character


Re: Randomising... - Mencent - 07.10.2016

You can use Actors, they don't Need a Slot.
https://sampwiki.blast.hk/wiki/CreateActor


Re: Randomising... - SickAttack - 07.10.2016

You can use the function GetPlayerTargetActor in combination of a timer to see if a player is aiming at the actor.


Re: Randomising... - StrikerZ - 07.10.2016

I'm using JakAdmin system for my new gamemode. But the values which i put to write on register, i.e 1500 money and 1 score won't be given to player neither my SetPlayerColor works


Re: Randomising... - SickAttack - 07.10.2016

Post in JakAdmin's release thread.


Re: Randomising... - StrikerZ - 07.10.2016

And why SetPlayerColor won't work?


Re: Randomising... - SickAttack - 07.10.2016

Because you refuse to ask the creator.


Re: Randomising... - StrikerZ - 07.10.2016

It didn't worked before too when i was not using any admin system