Raised This Month: $51 Target: $400
 12% 

Random player


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
raizo11
BANNED
Join Date: Dec 2013
Location: https://t.me/pump_upp
Old 02-01-2016 , 23:08   Random player
Reply With Quote #1

How to make this to play 10 rounds 1vs1?

Code:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>



#define PLUGIN    "1vs1"
#define AUTHOR    "x"
#define VERSION    "1.0"

new players[32]
new count
new randomtero
new randomct
new g_current_tero
new g_current_ct


public plugin_init()
{
    register_plugin(PLUGIN, VERSION, AUTHOR)    

    RegisterHam(Ham_Spawn, "player", "playerSpawn", 1);
}

public playerSpawn(id)
{
     g_current_tero++, g_current_ct++,
     get_players(players,count,"e","TERRORIST")
     randomtero = players[random(count)]
     set_pev( randomtero , pev_origin , { 300.0 , -150.0 , -650.0 } );
     get_players(players,count,"e","CT")
     randomct = players[random(count)]
     set_pev( randomct , pev_origin , { 50.0 , -150.0 , -650.0 } );
     if( g_current_tero < 1, g_current_ct < 1 ) {
     }

}

Last edited by raizo11; 02-02-2016 at 10:01.
raizo11 is offline
Send a message via ICQ to raizo11 Send a message via AIM to raizo11 Send a message via MSN to raizo11 Send a message via Yahoo to raizo11 Send a message via Skype™ to raizo11
Visinescu
Senior Member
Join Date: Dec 2015
Location: England now,Home Romania
Old 02-01-2016 , 23:55   Re: Random player bug
Reply With Quote #2

This is not the full code.
Visinescu is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 02-02-2016 , 05:06   Re: Random player
Reply With Quote #3

You wanna block from what?
__________________
Project: Among Us
Craxor is offline
Send a message via ICQ to Craxor
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 02-02-2016 , 14:53   Re: Random player
Reply With Quote #4

You want to kill other players which are not "the lucky ones" (i mean not randomly selected) or place them to spectator?
siriusmd99 is offline
raizo11
BANNED
Join Date: Dec 2013
Location: https://t.me/pump_upp
Old 02-03-2016 , 00:03   Re: Random player
Reply With Quote #5

I need 1 ct and 1 tero to play 10 rounds , after 10 rounds end choose other 2 players
raizo11 is offline
Send a message via ICQ to raizo11 Send a message via AIM to raizo11 Send a message via MSN to raizo11 Send a message via Yahoo to raizo11 Send a message via Skype™ to raizo11
AGustiN.
New Member
Join Date: Feb 2016
Old 02-03-2016 , 09:31   Re: Random player
Reply With Quote #6

Code:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>



#define PLUGIN    "1vs1"
#define AUTHOR    "x"
#define VERSION    "1.0"

new players[32]
new count
new randomtero
new randomct
new g_current_tero
new g_current_ct
new g_round

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)    
	
	RegisterHam(Ham_Spawn, "player", "playerSpawn", 1);
	
	register_event("HLTV", "event_new_round", "a", "1=0", "2=0")  
}
public event_new_round() g_round++

public playerSpawn(id)
{
	if(g_round < 10) return;
	
	g_round = 0
	g_current_tero++, g_current_ct++,
	get_players(players,count,"e","TERRORIST")
	randomtero = players[random(count)]
	set_pev( randomtero , pev_origin , { 300.0 , -150.0 , -650.0 } );
	get_players(players,count,"e","CT")
	randomct = players[random(count)]
	set_pev( randomct , pev_origin , { 50.0 , -150.0 , -650.0 } );
	if( g_current_tero < 1, g_current_ct < 1 ) {
	}
	
}

Last edited by AGustiN.; 02-03-2016 at 09:32.
AGustiN. is offline
raizo11
BANNED
Join Date: Dec 2013
Location: https://t.me/pump_upp
Old 02-03-2016 , 12:04   Re: Random player
Reply With Quote #7

not working
raizo11 is offline
Send a message via ICQ to raizo11 Send a message via AIM to raizo11 Send a message via MSN to raizo11 Send a message via Yahoo to raizo11 Send a message via Skype™ to raizo11
AGustiN.
New Member
Join Date: Feb 2016
Old 02-03-2016 , 13:19   Re: Random player
Reply With Quote #8

Quote:
Originally Posted by raizo11 View Post
not working
hablas español? te andaba antes?
AGustiN. is offline
raizo11
BANNED
Join Date: Dec 2013
Location: https://t.me/pump_upp
Old 02-03-2016 , 13:34   Re: Random player
Reply With Quote #9


Last edited by raizo11; 02-03-2016 at 14:14.
raizo11 is offline
Send a message via ICQ to raizo11 Send a message via AIM to raizo11 Send a message via MSN to raizo11 Send a message via Yahoo to raizo11 Send a message via Skype™ to raizo11
Reply



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 21:05.


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