06.07.2012, 10:54
I have created a mysql register/login Script.
I also use it for Admins. But I have problems with admins commands.
I want to use it for level 3. But all players can use it.
I hope you can help me.
I also use it for Admins. But I have problems with admins commands.
Код:
new Text3D:adminonduty; COMMAND:onduty(playerid, params[]) { mysql_query("SELECT name FROM playerdata WHERE level > 2"); mysql_store_result(); if(mysql_affected_rows()>0) { new string[128]; format(string, sizeof(string), "Administrator %s is now onduty!", PlayerName(playerid)); SendClientMessage(playerid, red, string); adminonduty = Create3DTextLabel("Administrator", lightgreen, 30.0, 40.0, 50.0, 40.0, 0); Attach3DTextLabelToPlayer(adminonduty, playerid, 0.0, 0.0, 0.7); SetPlayerHealth(playerid, 999999); } else return SendClientMessage(playerid, red, "Error: You must be Administrator level 3 to use this command"); mysql_free_result(); return 1; }
I hope you can help me.