AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Respawn 50% Lucky (https://forums.alliedmods.net/showthread.php?t=209102)

Erdener 02-21-2013 07:20

Respawn 50% Lucky
 
How can I do? Respawn 50% Lucky

Quote:

Originally Posted by Subrosa007
Hey amazing man!

Can you make me maybe a little /vipmenu? If you read that i give you some things what there should be?

*HP and AP
*Glow Color
*Speed - 450 at the round end and when you pick gun then speed will not go.
*Gravity - 500
*Glock with 1 bull
*Silent Footsteps
*Respawn 50% Lucky

Sounds Good ?

I make ->

PHP Code:

public vipmenuhandler(idmenuitem)
{
        case 
7// Respawn 50% Lucky
        

            
set_task(0.1"respawn"id);
            
client_printc(id"%s You Have just recieved !gRespawn Lucky!n"PREFIX); 
        } 


public 
respawn() {
    if( 
random )
    {
        
ExecuteHamB(Ham_CS_RoundRespawnid);
        
client_printc(idprint_chat"%s: You are Respawn!!"PREFIX);
    }



Unkolix 02-21-2013 07:24

Re: Respawn 50% Lucky
 
What do you mean "Respawn 50% Lucky"? That if player dies, he has 1/2 chance of getting respawned?

oxygen935 02-21-2013 07:32

Re: Respawn 50% Lucky
 
PHP Code:

new truenumber random_num(12);
if ( 
truenumber == )
{
//code here...



Erdener 02-21-2013 07:32

Re: Respawn 50% Lucky
 
yep

Backstabnoob 02-21-2013 07:33

Re: Respawn 50% Lucky
 
PHP Code:

if( random) )
{
  
// code



hleV 02-21-2013 07:38

Re: Respawn 50% Lucky
 
Quote:

Originally Posted by Backstabnoob (Post 1898841)
PHP Code:

if( random) )
{
  
// code



*random(2)

Erdener 02-21-2013 08:03

Re: Respawn 50% Lucky
 
I make

PHP Code:

public respawn() {
    if( 
random ) )
    {
        new 
iNumiPlayers[32];
        
get_players(iPlayersiNum"ae");
        if( 
iNum )
        {
            new 
id iPlayers[random_num(0iNum)];
            
ExecuteHamB(Ham_CS_RoundRespawnid);
            
client_printc(idprint_chat"%s: You are Respawn!!"PREFIX);
        }
    }


but, doesn't work.

jimaway 02-21-2013 08:19

Re: Respawn 50% Lucky
 
random(2) will give you 66.6% chance, use random(1)

Podarok 02-21-2013 08:49

Re: Respawn 50% Lucky
 
PHP Code:

if( random_num (0100) <= 50 )
{
// We insert here a gay code



Erdener 02-21-2013 09:14

Re: Respawn 50% Lucky
 
doesn't work. :?


All times are GMT -4. The time now is 21:45.

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