Raised This Month: $ Target: $400
 0% 

Help edit ad_manager.amxx (make advertise only for dead and spec)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mofforg
Senior Member
Join Date: Aug 2010
Location: Moscow, Russia
Old 07-17-2011 , 10:40   Re: Help edit ad_manager.amxx (make advertise only for dead and spec)
Reply With Quote #1

PHP Code:
ad_manager.sma(278) : error 017undefined symbol "id" 
PHP Code:
278:  if( is_user_aliveid ) || get_user_teamid ) != CS_TEAM_SPECTATOR 
Mofforg is offline
Send a message via ICQ to Mofforg Send a message via Skype™ to Mofforg
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-17-2011 , 14:30   Re: Help edit ad_manager.amxx (make advertise only for dead and spec)
Reply With Quote #2

Quote:
Originally Posted by Mofforg View Post
PHP Code:
ad_manager.sma(278) : error 017undefined symbol "id" 
PHP Code:
278:  if( is_user_aliveid ) || get_user_teamid ) != CS_TEAM_SPECTATOR 
"id" is undefined. Use the code posted by hornet.
__________________
fysiks is offline
Mofforg
Senior Member
Join Date: Aug 2010
Location: Moscow, Russia
Old 07-17-2011 , 21:14   Re: Help edit ad_manager.amxx (make advertise only for dead and spec)
Reply With Quote #3

Quote:
Originally Posted by fysiks View Post
"id" is undefined. Use the code posted by hornet.
I do!

With his code, ID is undefined.

Quote:
public displayAd(params[])
Here`s no ID.
Mofforg is offline
Send a message via ICQ to Mofforg Send a message via Skype™ to Mofforg
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-17-2011 , 21:19   Re: Help edit ad_manager.amxx (make advertise only for dead and spec)
Reply With Quote #4

Quote:
Originally Posted by Mofforg View Post
I do!
No you don't. His code is copy/paste-able.
__________________
fysiks is offline
Mofforg
Senior Member
Join Date: Aug 2010
Location: Moscow, Russia
Old 07-17-2011 , 21:31   Re: Help edit ad_manager.amxx (make advertise only for dead and spec)
Reply With Quote #5

Quote:
Originally Posted by fysiks View Post
No you don't. His code is copy/paste-able.
I dont understand you.

It`s my current part of code, i use.

PHP Code:
public displayAd(params[])
{
    
//Get the string that is going to be displayed
    
new message[128];
    
getString(STOREparams[1], message127params[0], params[1]);
    
    
//If its enabled by cvar and id is set, display to person who triggered message only
    
if(get_cvar_num("ad_react_all") == && params[2] != 0)
    {
        
message_begin(MSG_ONEgmsgSayText, {0,0,0}, params[2]);
        
write_byte(params[2]);
        
write_string(message);
        
message_end();
    
    } else
    {
    
//Display the message to everyone
    
new plist[32], playernumplayer;
        
    
get_players(plistplayernum"c");
    
    for(new 
0playernumi++)
    {
    
player plist[i];
            
    if( 
is_user_aliveid ) || get_user_teamid ) != CS_TEAM_SPECTATOR )
        continue;
        
    
message_begin(MSG_ONEgmsgSayText, {0,0,0}, player);
    
write_byte(player);
    
write_string(message);
    
message_end();
    }  
    }
    
    return 
PLUGIN_HANDLED;

Mofforg is offline
Send a message via ICQ to Mofforg Send a message via Skype™ to Mofforg
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-17-2011 , 23:31   Re: Help edit ad_manager.amxx (make advertise only for dead and spec)
Reply With Quote #6

who told you to use "id"????? Nobody. Use his code as is.
__________________
fysiks is offline
gamer99
Senior Member
Join Date: Jul 2011
Old 07-18-2011 , 00:31   Re: Help edit ad_manager.amxx (make advertise only for dead and spec)
Reply With Quote #7

Mofforg if you are not sure what your doing whats the harm in listening to experienced coder like fysiks and hornet .Do not think that ID is there by default in any fucntion .
gamer99 is offline
Mofforg
Senior Member
Join Date: Aug 2010
Location: Moscow, Russia
Old 07-18-2011 , 08:58   Re: Help edit ad_manager.amxx (make advertise only for dead and spec)
Reply With Quote #8

Quote:
Originally Posted by fysiks View Post
who told you to use "id"????? Nobody. Use his code as is.
o_O

Only now i see the change in his code. He had edited the message after. I copy from his code.

Last edited by Mofforg; 07-18-2011 at 09:00.
Mofforg is offline
Send a message via ICQ to Mofforg Send a message via Skype™ to Mofforg
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 00:52.


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