Raised This Month: $ Target: $400
 0% 

Conversion problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hellraser
Member
Join Date: Jul 2004
Old 07-13-2004 , 21:12   Conversion problem
Reply With Quote #1

Hey all,have been trying to convert this amx plugin but doesnt work right...
May someone help me out plz:
Code:
#include <amxmodx>
#include <file>

public plugin_init()  {
        register_plugin("Display rules on connect","1.00","[TeamHoward]PapaSmurf")
        register_cvar("mp_displaytime","30.0",4 )
        register_cvar("mp_red","255.0",4 )
        register_cvar("mp_green","0.0",4 )
        register_cvar("mp_blue","0.0",4 )
        register_clcmd("say /rules","rules")
        register_clcmd("say_team /rules","rules")
        return PLUGIN_CONTINUE
}

public client_connect(id)  {
        set_task(20.0,"rules",id,"",0,"",0)
        client_cmd( id, "say OK" );
}

public rules(id)  {
        new line[80], len, Lines = 0
        new rulesTable[1280]
        new Float:displaytime = get_cvar_float("mp_displaytime")
        new red = get_cvar_num("mp_red")
        new green = get_cvar_num("mp_green")
        new blue = get_cvar_num("mp_blue")
        while (read_file("addons/amxx/custom/rules.txt", Lines++, line, 79, len))  {
                format(line, 79,"%s^n",line)
                add(rulesTable,1279,line)
        }
        set_hudmessage( red,green,blue, 0.028, 0.125, 2, 0.02,displaytime, 0.01, 0.1, 4 )
        show_hudmessage( id,rulesTable )
        return PLUGIN_HANDLED
}
Thx
hellraser is offline
Burnzy
Veteran Member
Join Date: Apr 2004
Old 07-13-2004 , 21:21  
Reply With Quote #2

u dont need the file include
__________________
Burnzy is offline
Send a message via AIM to Burnzy
hellraser
Member
Join Date: Jul 2004
Old 07-14-2004 , 05:55  
Reply With Quote #3

hum okey but still doesn't work correctly :/
Its displays the message before i select a team the when i choose T or CT the message disapears..
And when i type "say /rules" it just disconnects me from the server :/
hellraser is offline
Dygear
SourceMod Donor
Join Date: Apr 2004
Location: Levittown, NY
Old 07-14-2004 , 06:42  
Reply With Quote #4

It compiled fine for me, when i removed the "#include <file>"
Try testing it out with out file being included.
__________________
Dygear is offline
Send a message via AIM to Dygear Send a message via MSN to Dygear Send a message via Skype™ to Dygear
hellraser
Member
Join Date: Jul 2004
Old 07-14-2004 , 08:21  
Reply With Quote #5

yes compiles fine but then on STEAM/1.6 doesnt work correctly...
hellraser is offline
BAILOPAN
Join Date: Jan 2004
Old 07-14-2004 , 08:54  
Reply With Quote #6

You have to say WHAT doesn't work!
__________________
egg
BAILOPAN is offline
hellraser
Member
Join Date: Jul 2004
Old 07-14-2004 , 09:19  
Reply With Quote #7

i did:
1]When i connect the messages shows well before i select a team then it disapears
2] when i type /rules i get disconnected from the servers !

Thx
hellraser is offline
QwertyAccess
Veteran Member
Join Date: Feb 2004
Location: Enjiru Layer
Old 07-14-2004 , 16:59  
Reply With Quote #8

how can you get disconnected by saying /rules does it say overflow or anything? or what.
__________________
QwertyAccess is offline
hellraser
Member
Join Date: Jul 2004
Old 07-14-2004 , 18:12  
Reply With Quote #9

says aboslutely nothing :/
This plugin was at the beginning an NS plugin
hellraser is offline
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 07-15-2004 , 03:50  
Reply With Quote #10

I dont think displaying the stuff 20 seconds after client_connect is a good idea. I suggest you start off from client_putinserver instead, then add like 5-10 seconds to that. 20 seconds is probably way too short a time and those that precache the map/soundfiles/other files will never see it.
Johnny got his gun 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 14:48.


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