14.05.2017, 13:40
I think the main issue is that you give no arguments, yet give specifiers.
You're missing "playerid" at the end. Additionally, instead of placing code beneath this, you should place it into OnAccountRegister. This would become:
This logically makes more sense and also allows you to properly handle errors, such as the row not being created. You could also further optimize this by making Logged a boolean, instead of an integer (assuming it's only using 0 and 1 as values).
Код:
mysql_tquery(mysql, query, "OnAccountRegister", "d");
Код:
public OnAccountRegister(playerid) { if(cache_insert_id() == -1) return 1; // row wasn't created, error handling goes here PlayerInfo[playerid][Logged] = 1; SendClientMessage(playerid, -1, "{FFFF00}[ACCOUNT]: {FFFFFF}Account succesfuly registered."); PlayerPlaySound(playerid,1057,0.0,0.0,0.0); // whatever else return true; }