Raised This Month: $ Target: $400
 0% 

Get_players stock


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Crackhead69
Member
Join Date: Feb 2021
Old 04-24-2021 , 12:07   Get_players stock
Reply With Quote #1

Hello!
I am trying to figure out how to make a get_players stock which can be used like so
PHP Code:
new players

public plugin_init() {
    
register_clcmd("say /test","TestStock")
}

public 
TestStock(id){
    if(!
is_user_alive(id) || !is_user_connected(id)) return
    
    
get_them_players("ae","TERRORIST")
    
    
set_user_health(players20)
}

stock get_them_players(szFlags[] = ""szTeam[] = ""){
    
players = -1
    
    
new iPlayers[32], iPnum
    get_players
(iPlayersiPnumszFlagsszTeam)
    
    for(new 
i;iiPnum;i++)
        
players iPlayers[i]

From the above code the goal is to set the HP of all the T players using the stock to 20 by calling the stock,
tho as i test it, it sets the hp to 20 on random T players, not on all of them.

I would appreciate if somebody could lay some wisdom.
Crackhead69 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 10:11.


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