Raised This Month: $222 Target: $400
 55% 

Solved [Help] Player selection


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Thew_ConFiger
Member
Join Date: Apr 2019
Old 01-21-2021 , 12:54   [Help] Player selection
Reply With Quote #1

solved

Last edited by Thew_ConFiger; 03-27-2021 at 15:08.
Thew_ConFiger is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-21-2021 , 13:43   Re: [Help] Player selection
Reply With Quote #2

Code:
new iPlayers[32], iPlayer[CsTeams], iPnum get_players(iPlayers, iNum, "ae", "CT") if(iPnum) {     iPlayer[CS_TEAM_CT] = iPlayers[random(iPnum)] } get_players(iPlayers, iNum, "ae", "TERRORIST") if(iPnum) {     iPlayer[CS_TEAM_T] = iPlayers[random(iPnum)] } // iPlayer[CS_TEAM_CT] is your random CT // iPlayer[CS_TEAM_T] is your random T
__________________


Dear admins. If somehow you managed to read this, plz fix.

Last edited by OciXCrom; 01-21-2021 at 13:44.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Thew_ConFiger
Member
Join Date: Apr 2019
Old 01-21-2021 , 13:59   Re: [Help] Player selection
Reply With Quote #3

solved

Last edited by Thew_ConFiger; 03-27-2021 at 15:08.
Thew_ConFiger is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-21-2021 , 14:55   Re: [Help] Player selection
Reply With Quote #4

Code:
// iPlayer[CS_TEAM_CT] is your random CT // iPlayer[CS_TEAM_T] is your random T

Use these.
__________________


Dear admins. If somehow you managed to read this, plz fix.

Last edited by OciXCrom; 01-21-2021 at 14:55.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Thew_ConFiger
Member
Join Date: Apr 2019
Old 01-21-2021 , 15:44   Re: [Help] Player selection
Reply With Quote #5

solved

Last edited by Thew_ConFiger; 03-27-2021 at 15:08.
Thew_ConFiger is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-21-2021 , 17:52   Re: [Help] Player selection
Reply With Quote #6

Your mistake is using "id" when I told you 2 times to use "iPlayer[CS_TEAM_CT]" and "iPlayer[CS_TEAM_T]".
__________________


Dear admins. If somehow you managed to read this, plz fix.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Thew_ConFiger
Member
Join Date: Apr 2019
Old 01-22-2021 , 01:40   Re: [Help] Player selection
Reply With Quote #7

solved

Last edited by Thew_ConFiger; 03-27-2021 at 15:08.
Thew_ConFiger is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 01-22-2021 , 05:07   Re: [Help] Player selection
Reply With Quote #8

Because you need to replace if(iPnum) with if(iNum)
__________________
@Jailbreak Main Mod v2.6.5 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Thew_ConFiger
Member
Join Date: Apr 2019
Old 01-22-2021 , 06:35   Re: [Help] Player selection
Reply With Quote #9

solved

Last edited by Thew_ConFiger; 03-27-2021 at 15:08.
Thew_ConFiger is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 01-22-2021 , 06:38   Re: [Help] Player selection
Reply With Quote #10

seems like you have no idea about coding next time please post in suggestion request.
PHP Code:
#include <amxmodx> 
#include <amxmodx>
#include <cstrike>
#include <engine>
#include <fun>
#include <hamsandwich>

public plugin_init() {
    
register_plugin("StarWars","1.0","Thew_ConFiger")
    
register_event("ResetHUD""resetModel""b")
    
register_logevent"roundstart"2"1=Round_Start" );
    
}
public 
roundstart( )
{
new 
iPlayers[32], iPlayer[CsTeams], iNum
get_players
(iPlayersiNum"ae""CT")

if(
iNum)
{
    
iPlayer[CS_TEAM_CT] = iPlayers[random(iNum)]
    
set_user_health(iPlayer[CS_TEAM_CT], get_user_health(iPlayer[CS_TEAM_CT]) + 150);
}

get_players(iPlayersiNum"ae""TERRORIST")

if(
iNum)
{
    
iPlayer[CS_TEAM_T] = iPlayers[random(iNum)]
    
set_user_health(iPlayer[CS_TEAM_T], get_user_health(iPlayer[CS_TEAM_T]) + 150);
}

__________________
@Jailbreak Main Mod v2.6.5 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Reply


Thread Tools
Display Modes

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 03:49.


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