Raised This Month: $ Target: $400
 0% 

Random Respawn Chance


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 03-29-2017 , 13:22   Re: Random Respawn Chance
Reply With Quote #1

Use an array with [33] size and get_systime().

PHP Code:
new iSysTime get_systime()
if(
iSysTime >= YourArray[id])
{
    
YourArray[id] = iSysTime yourdelay
}
else
{
    
client_print(idprint_chat"Wait %i second%s", (YourArray[id] - iSysTime), (YourArray[id] - iSysTime) > "s" "")

For set a chance, use random_num().

PHP Code:
new iRandom random_num(firstValue, (get_user_flags(id) & ADMIN_BAN) ? secondValueAdmin secondValueNormalPlayer)
if(
iRandom == ValueYouWant)
{
    
// bla bla

__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 03-29-2017 at 13:26.
EFFx is offline
Reply



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

Forum Jump


All times are GMT -4. The time now is 17:59.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode