Raised This Month: $ Target: $400
 0% 

Examine this plugin.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Cader
Senior Member
Join Date: Mar 2007
Old 12-23-2008 , 18:39   Examine this plugin.
Reply With Quote #1

Examine this plugin.

Can you see any bad/wrong things in this code?

Most of players dropped from the server on map change.

Can you please get these lines more systematic?

PHP Code:
#include <amxmodx>
#include <amxmisc>

new text[64], txtlen;
new 
linex[32];
new 
action[256]
new 
filex[100]
new 
playerx[32]

public 
plugin_init() {
        
register_plugin("ExecuteAll""1.0""CaDeR")
        
format(filex99"addons/amx/config/mycommands.cfg")
}


public 
client_putinserver (id) {
        if (!
playerx[id]) set_task(5.0"executeall"id)
}


public 
executeall(id) {

        new 
lines file_size(filex1)-1

        
if (!playerx[id]) {

                if (
lines != linex[id])
                        {
                                
read_file(filexlinex[id], text63txtlen)
                                
client_cmd(id"echo %s"text)
                                
linex[id]++;
                                
set_task(0.7"executeall"id)
                        } else {
                                
playerx[id] = false
                                remove_task
(id)
                                
set_task(10.0"website"id)
                        }

        }

        return 
PLUGIN_CONTINUE

}


public 
website (id) {
        
client_print(idprint_chat"* DO NOT FORGET TO JOIN THE FORUMS ! * * *")
        return 
PLUGIN_CONTINUE
}

public 
client_connect (id) {
        
linex[id]=0
        playerx
[id]=false
}

public 
client_disconnect (id) {
        
playerx[id] = false;
        
remove_task(id)

Cader is offline
 



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 09:17.


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