Raised This Month: $ Target: $400
 0% 

maxplayers


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
vl@d
Senior Member
Join Date: Dec 2006
Location: Romania
Old 08-31-2007 , 08:26   maxplayers
Reply With Quote #1

I need a confirmation on what is maxplayers is cvar float, string?
__________________


I hate Spammers....
vl@d is offline
_Master_
Senior Member
Join Date: Dec 2006
Old 08-31-2007 , 11:24   Re: maxplayers
Reply With Quote #2

int

On a side-note: all cvars are strings. They are converted to a specific type (other than string) by means of get_cvar_num(), get_cvar_float() or their pcvar counterparts. The initial type of the cvar is a string and is converted internally by get_[p]cvar_*() to the specified type.
_Master_ is offline
vl@d
Senior Member
Join Date: Dec 2006
Location: Romania
Old 09-01-2007 , 06:52   Re: maxplayers
Reply With Quote #3

hmm.
Code:
Welcome to the AMX Mod X 1.76-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Error: Argument type mismatch (argument 1) on line 34
Warning: Expression has no effect on line 34
Error: Expected token: ";", but found ")" on line 34
Error: Invalid expression, assumed zero on line 34
Error: Too many error messages on one line on line 34

Compilation aborted.
4 Errors.
Could not locate output file D:\cs\cstrike\addons\amxmodx\scripting\round_start_event.amx (compile failed).
Cand you give an ex.?
__________________


I hate Spammers....
vl@d is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 09-01-2007 , 06:59   Re: maxplayers
Reply With Quote #4

Post the code ... :S
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
vl@d
Senior Member
Join Date: Dec 2006
Location: Romania
Old 09-01-2007 , 10:20   Re: maxplayers
Reply With Quote #5

Code:
public round(id){
    new Players[32]
    new max_pl[32]
    new timeleft = get_timeleft()
    new playercount
    if(get_cvar_float("mp_roundtime") * 60.0)
    ++g_roundCount
    get_players(Players, playercount)
    get_pcvar_string("max_pl",maxplayers,31)
    ColorChat(0, BLUE, "[Runda %d Incepe Cu --> FF:%s | Jucatori On %d Din %d | Timpul Ramas:%d:%02d]",g_roundCount,get_cvar_num("mp_friendlyfire") ? "ON" : "OFF",Players,max_pl,timeleft / 60, timeleft % 60);     
    set_task(3.0,"round2",id,_,_,"a",1)
}
This is not all the code.
__________________


I hate Spammers....
vl@d is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 09-01-2007 , 10:29   Re: maxplayers
Reply With Quote #6

What a mess >.> :S , like this should look the code :

Code:
public round(id)
{
 new players[32], num;
 get_players(players, num);
 
 new max_players = get_maxplayers();
 new time_left = get_timeleft();
 
 g_roundCount += 1;
 
 ColorChat(0, BLUE, "[Runda %d Incepe Cu --> FF:%s | Jucatori On %d Din %d | Timpul Ramas:%d:%02d]", g_roundCount, get_cvar_num("mp_friendlyfire") ? "ON" : "OFF", num, max_players, time_left / 60, time_left % 60);
 
 set_task(3.0, "round2", id,_,_);
}
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Old 09-02-2007, 15:39
Silencer123
This message has been deleted by Silencer123. Reason: I edited this 4 times and then again saw something i missed. >_>
_Master_
Senior Member
Join Date: Dec 2006
Old 09-03-2007 , 02:34   Re: maxplayers
Reply With Quote #7

My guess is it will spam the chat and will mess up the round counter...
_Master_ is offline
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 16:05.


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