Raised This Month: $ Target: $400
 0% 

Random Respawn Chance


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
LifeStone
Member
Join Date: Oct 2015
Old 03-29-2017 , 04:16   Random Respawn Chance
Reply With Quote #1

Hello guys i want to make this plugin to give chance once per round and not with the time
(example: if i write /reviveme me and command used say "Try again in x seconds.")
and i want to make it to give one chance per round
and something else i want to make it to give more chance to admins
(example: admins 15% chance players 10% chance)
like this
PHP Code:
        register_cvar("spawnchance_odds","100")

        new 
ChanceAmount random(get_cvar_num("spawnchance_odds")) 

        if (
get_user_flags(id) & ADMIN_IMMUNITY
        { 
            if (
ChanceAmount <= 15
            { 
                
client_print(id,print_chat"You win! Prepare to be respawned!"
            } 
            else if (
ChanceAmount 15
            { 
                
client_print(id,print_chat"Sorry, you didn't respawn this time!"
            } 
        } 
        else 
        { 
            if (
ChanceAmount <= 10
            { 
                
client_print(id,print_chat"You win! Prepare to be respawned!"
            } 
            else if (
ChanceAmount 10
            { 
                
client_print(id,print_chat"Sorry, you didn't respawn this time!"
            } 
        } 
Attached Files
File Type: sma Get Plugin or Get Source (respawnchance.sma - 458 views - 8.9 KB)

Last edited by LifeStone; 04-01-2017 at 12:23.
LifeStone is offline
 



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