Raised This Month: $ Target: $400
 0% 

[HELP] Get player/bot id and randomize?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 09-27-2015 , 10:20   [HELP] Get player/bot id and randomize?
Reply With Quote #1

Hi, i'm doing a little test to give weapons to a random player, but it does not know how to do, can you help me?

PHP Code:
#include < amxmodx >
#include < fun >
#include < hamsandwich >

new weapons_test[][] = 
{
    
"weapon_m4a1",
    
"weapon_ak47",
    
"weapon_sg552"
}

public 
plugin_init() 
{
    
RegisterHam(Ham_Spawn"player""fw_HamPlayerSpawnPost"1);
}

public 
fw_HamPlayerSpawnPost(id)
{
    if(
is_user_alive(id))
    {
        new 
size_weapons random(sizeof weapons_test);
        
give_item(idweapons_test[size_weapons]);
    }

__________________









Last edited by CrazY.; 09-27-2015 at 10:21.
CrazY. 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 22:04.


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