Raised This Month: $ Target: $400
 0% 

Works on win but not on linux?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 05-09-2010 , 11:44   Works on win but not on linux?
Reply With Quote #1

This works perfectly on my Windows server, on the linux one not, i can't see the message. I uploaded everything fine, code:

PHP Code:
public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR);
    
    
register_event("DeathMsg""eDeath""a");
}

public 
eDeath()
{
    new 
killer read_data);
    new 
victim read_data);
    new 
weapon[8]
    
read_data(4weapon7
    
    new 
szNameK[32], szNameV[32];
    
get_user_name(killerszNameK31);
    
get_user_name(victimszNameV31);
    
    if (
killer != victim && equal(weapon"awp")) 
    {
    
client_print(0print_chat"%s killed someone with the AWP!"szNameK);
    }

KadiR is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 05-09-2010 , 11:56   Re: Works on win but not on linux?
Reply With Quote #2

I don't see why it wouldn't work.
You may want to try the optimized version:
PHP Code:
public plugin_init() 

    
register_plugin(PLUGINVERSIONAUTHOR); 
 
    
register_event("DeathMsg""eDeath""a""1>0"); 

 
public 
eDeath() 

    new 
killer read_data); 
 
    if (
killer == read_data(2))
        return;
 
    new 
weapon[5
    
read_data(4weapon4
 
    if (!
equal(weapon"awp"))
        return; 
 
    new 
szNameK[32]; 
    
get_user_name(killerszNameK31); 
 
    
client_print(0print_chat"%s killed someone with the AWP!"szNameK); 

__________________
hleV is offline
Seta00
The Seta00 user has crashed.
Join Date: Jan 2010
Location: Berlin
Old 05-26-2010 , 19:52   Re: Works on win but not on linux?
Reply With Quote #3

Quote:
Originally Posted by hleV View Post
PHP Code:
    if (!equal(weapon"awp")) 
Shouldn't weapon be "weapon_awp"?
Seta00 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-26-2010 , 20:02   Re: Works on win but not on linux?
Reply With Quote #4

Quote:
Originally Posted by Seta00 View Post
Shouldn't weapon be "weapon_awp"?
http://wiki.amxmodx.org/Half-Life_1_...vents#DeathMsg
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 05-09-2010 , 15:12   Re: Works on win but not on linux?
Reply With Quote #5

Ok I updated it with your code. Still works only on WIN I reuploaded everything fine.
KadiR is offline
Old 05-16-2010, 12:17
KadiR
This message has been deleted by KadiR. Reason: need to learn some maths in my holidays again..
Old 05-16-2010, 12:53
fysiks
This message has been deleted by Exolent[jNr]. Reason: Reply to deleted post.
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 05-26-2010 , 14:50   Re: Works on win but not on linux?
Reply With Quote #8

bump
KadiR is offline
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 05-27-2010 , 15:15   Re: Works on win but not on linux?
Reply With Quote #9

As I said, it works perfect on windows, it prints that I killed someone with the AWP, but on my linux one.. not...
KadiR 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 03:37.


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