09.07.2011, 15:56
(
Последний раз редактировалось ServerRestart; 09.07.2011 в 18:01.
)
[ame]http://www.youtube.com/watch?v=yTEIgHrXxW0[/ame]
In my gamemode no commands work. when i join it says register your account ect.. but if i try to do /register {pass}
It says sorry, you need to login / register to continue. Heres the code on register system / error message.
-------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------
Anyone can help? =/
In my gamemode no commands work. when i join it says register your account ect.. but if i try to do /register {pass}
It says sorry, you need to login / register to continue. Heres the code on register system / error message.
-------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------
Quote:
dcmd_register(playerid,params[]) { new index = 0; tmps1 = strtok(params, index); GetPlayerName(playerid, playername, sizeof(playername)); if(!strlen(tmps1)) { SendClientMessage(playerid, COLOR_CMD, "* USAGE: /register [password]. This will register your nick. Don't forget your password."); return 1; } if(20 < strlen(tmps1) || strlen(tmps1) < 5) { SendClientMessage(playerid, COLOR_SYSTEM_PW, "* Password length must be 5-20 symbols."); return 1; } else { if (!dini_Exists(udb_encode(playername))) { dini_Create(udb_encode(playername)); dini_IntSet(udb_encode(playername), "password", udb_hash(tmps1)); dini_IntSet(udb_encode(playername), "newplayer", 1); format(strings, sizeof(strings), "%s --- %s (id: %d) created account. Passwordhash: %s.", SystemTime,playername, playerid,udb_hash(tmps1)); printf(strings); format(strings, sizeof(strings), "* Account named %s created! You can login with password %s.", playername, tmps1); SendClientMessage(playerid, COLOR_SYSTEM_PM, strings); if(spawned[playerid]){ GameTextForPlayer(playerid, "~w~ You are not logged in! type /login", 120000, 3); LoginTimeout[playerid]=60; } } else { format(strings, sizeof(strings), "* %s is already registered.", playername,tmps1); SendClientMessage(playerid, COLOR_SYSTEM_PW, strings); } } return 1; } |
------------------------------------------------------------------------------------------------------------
Quote:
f(logged[playerid] == 0){ dcmd(help,4,cmdtext); dcmd(register,8,cmdtext); dcmd(login,5,cmdtext); dcmd(accounthelp,11,cmdtext); return SendClientMessage(playerid,COLOR_MENU,"* You need to login before other commands are available. Check /accounthelp for the available commands."); |
Anyone can help? =/