AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Plugin End question (https://forums.alliedmods.net/showthread.php?t=254887)

skz 01-07-2015 16:20

Plugin End question
 
PHP Code:

public plugin_end()
{
    
NewMap true
}

public 
client_disconnect(id)
{
    if(!
NewMap)
    {
        
Save(id)
    }


This is the correct way to stop data save (points, xp etc...) when the map changes?

akcaliberg 01-07-2015 16:23

Re: Plugin End question
 
It is not clear what you are asking exactly.

Changing a global boolean at plugin_end makes no sense by the way.

skz 01-07-2015 16:26

Re: Plugin End question
 
Quote:

Originally Posted by akcaliberg (Post 2246179)
It is not clear what you are asking exactly.

Changing a global boolean at plugin_end makes no sense by the way.

I'm using MySql, I use 1 bool on plugin_end to prevent SQL_ThreadQuery error on map changes, (an error that happens on AMXBans too), so you're wrong when you say that using a bool on plugin_end makes no sense.

Sorry for my english by the way

fysiks 01-07-2015 19:19

Re: Plugin End question
 
It's not possible for client_disconnect() to be called after pluign_end(). Therefore, setting that boolean in plugin_end() does, in fact, make no sense.


All times are GMT -4. The time now is 15:21.

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