Вот 2 команды но они почему то не работают на сервере в чем может быть дело?
Сриптов не каких не стоит с регой но все равно не работают=(
Code
//---------------
/*
* /register password
*
*/
dcmd_register(playerid,params[]) {
// The command shouldn't work if we already are authed
if (PLAYERLIST_authed[playerid]) return SystemMsg(playerid,"Already authed.");
// The command shouldn't work if an account with this
// nick already exists
if (udb_Exists(PlayerName(playerid))) return SystemMsg(playerid,"Àêêàóíò óæå ñóùåñòâóåò, èñïîëüçóéòå '/login <ïàðîëü>'.");
// Did he forgot the password?
if (strlen(params)==0) return SystemMsg(playerid,"ÏÐÀÂÊÀ: '/register password'");
// We save the money to the accstate
if (udb_Create(PlayerName(playerid),params)) return SystemMsg(playerid,"Account successfully created. Login with '/login password' now.");
return true;
}
/*
* /login password
*
*/
dcmd_login(playerid,params[]) {
// The command shouldn't work if we already are authed
if (PLAYERLIST_authed[playerid]) return SystemMsg(playerid,"Already authed.");
// The command shouldn't work if an account with this
// nick does not exists
if (!udb_Exists(PlayerName(playerid))) return SystemMsg(playerid,"Account doesn't exist, please use '/register password'.");
// Did he forgot the password?
if (strlen(params)==0) return SystemMsg(playerid,"ÏÐÀÂÊÀ: '/login <ïàðîëü>'");
if (udb_CheckLogin(PlayerName(playerid),params)) {
// Login was correct
// Following thing is the same like the missing SetPlayerCommand
GivePlayerMoney(playerid,dUserINT(PlayerName(playerid)).("money")-GetPlayerMoney(playerid));
PLAYERLIST_authed[playerid]=true;
return SystemMsg(playerid,"Successfully authed!");
}
// Login was incorrect
return SystemMsg(playerid,"Login failed!");
}