25.03.2016, 18:46
Quote:
|
The problem with this is things can go wrong, like what if that player disconnected within those 2 seconds? Or what if the server crashed? Or anything else that causes interruptions.
Giving the users the ability to run transactions would solve this. Code:
//Single Query
SavePVar(playerid, "Test0");
//Multiple Queries
StartPVarQuery(); // Macro for db_query("BEGIN")
SavePVar(playerid, "Test");
SavePVar(playerid, "Test2");
SavePVar(playerid, "Test3");
SavePVar(playerid, "Test4");
EndPVarQuery(); // Macro for db_query("COMMIT")
|
But, just few extra lines out of standard :P
Also, this can be resolved easily because player's name can be stored into the timer when the execute timer begins.


