SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 31/03/2009, 08:03 PM   #1
Shellegg
Huge Clucker
 
Join Date: Apr 2008
Posts: 282
Reputation: 0
Default How to make a probably command?

Hi,
I already saw commands like /try or /engine that have a probability of work (like 1 in 4 to fail)
I'm wondering if someone can explain me how to script a command with the probability 1 to succeed in 5.
Maybe this will help more poeple

Thanks
Shellegg is offline  
Old 31/03/2009, 08:35 PM   #2
Nero_3D
High-roller
 
Nero_3D's Avatar
 
Join Date: Jun 2007
Location: Germany
Posts: 2,849
Reputation: 675
Default Re: How to make a probably command?

pawn Code:
if(random(5) == 3)
Nero_3D is online now  
Old 31/03/2009, 08:37 PM   #3
MenaceX^
High-roller
 
Join Date: Aug 2008
Posts: 3,262
Reputation: 13
Default Re: How to make a probably command?

Or cases..
MenaceX^ is offline  
Old 31/03/2009, 08:38 PM   #4
Mikep
High-roller
 
Join Date: Apr 2008
Posts: 1,042
Reputation: 10
Default Re: How to make a probably command?

http://wiki.sa-mp.com/

Why does the wiki exist if nobody uses it..?
Mikep is offline  
Old 31/03/2009, 08:45 PM   #5
Shellegg
Huge Clucker
 
Join Date: Apr 2008
Posts: 282
Reputation: 0
Default Re: How to make a probably command?

because it have many titles and subtitles, i need an explanation or website telling me that.

Can you give me the wiki "tread" to see that? xD
Shellegg is offline  
Old 31/03/2009, 08:47 PM   #6
Mikep
High-roller
 
Join Date: Apr 2008
Posts: 1,042
Reputation: 10
Default Re: How to make a probably command?

Tread?

http://wiki.sa-mp.com/wiki/Random
Mikep is offline  
Old 31/03/2009, 08:56 PM   #7
Shellegg
Huge Clucker
 
Join Date: Apr 2008
Posts: 282
Reputation: 0
Default Re: How to make a probably command?

thats why i made tread with ""
Anyway, thank you homie, i'll make it and maaybe tell in this topic how i made it :P


EDIT: alright, i saw that and its taalkign mt about spawn.
I want to make a command with a probability to knockdown
Any tip?
Shellegg is offline  
Old 01/04/2009, 02:46 AM   #8
Mikep
High-roller
 
Join Date: Apr 2008
Posts: 1,042
Reputation: 10
Default Re: How to make a probably command?

http://wiki.sa-mp.com/wiki/Random
Mikep is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to make this command hardstop Help Archive 1 06/06/2010 09:25 AM
Please help in command make Scoots Help Archive 4 01/09/2009 08:30 PM
Make a log when using command. craponnaruto Help Archive 5 22/08/2009 09:44 AM
how do i make a /me command?! XCultz Help Archive 3 19/08/2009 12:48 AM
How to make this command KurtKill Help Archive 9 21/03/2009 12:52 AM


All times are GMT. The time now is 08:16 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.