30.03.2010, 18:00
I have a problem trying to change the commands in a script of admin Admin (more specifically Lethal (Lethal copyright)). I want to change this:
To this:
In short, I want to change "/register" by "/registre". The problem comes when escrido "/ register" or "/ register", which gives me error in both cases.
Postscript: I want to do the same with the login, I think no need to put the codes, but if you should need only have you to tell me.
Postscript 2: pardon my ignorance, but we were all newbies once, right?
PS 3: I speak English regularly, so please forgive my misspellings.
Quote:
dcmd_register(playerid,params[]) { if (PlayerInfo[playerid][LoggedIn] == 1) return SendClientMessage(playerid,red,"ACCOUNT: You are already registered and logged in."); if (udb_Exists(PlayerName2(playerid))) return SendClientMessage(playerid,red,"ACCOUNT: This account already exists, please use '/login [password]'."); if (strlen(params) == 0) return SendClientMessage(playerid,red,"ACCOUNT: Correct usage: '/register [password]'"); if (strlen(params) < 4 || strlen(params) > 20) return SendClientMessage(playerid,red,"ACCOUNT: Password length must be greater than three characters"); if (udb_Create(PlayerName2(playerid),params)) { new file[256],name[MAX_PLAYER_NAME], tmp3[100]; new strdate[20], year,month,day; getdate(year, month, day); GetPlayerName(playerid,name,sizeof(name)); format(file,sizeof(file),"/ladmin/users/%s.sav",udb_encode(name)); GetPlayerIp(playerid,tmp3,100); dini_Set(file,"ip",tmp3); // dini_Set(file,"password",params); dUserSetINT(PlayerName2(playerid)).("registered",1 ); format(strdate, sizeof(strdate), "%d/%d/%d",day,month,year); dini_Set(file,"RegisteredDate",strdate); dUserSetINT(PlayerName2(playerid)).("loggedin",1); dUserSetINT(PlayerName2(playerid)).("banned",0); dUserSetINT(PlayerName2(playerid)).("level",0); dUserSetINT(PlayerName2(playerid)).("LastOn",0); dUserSetINT(PlayerName2(playerid)).("money",0); dUserSetINT(PlayerName2(playerid)).("kills",0); dUserSetINT(PlayerName2(playerid)).("deaths",0); dUserSetINT(PlayerName2(playerid)).("hours",0); dUserSetINT(PlayerName2(playerid)).("minutes",0); dUserSetINT(PlayerName2(playerid)).("seconds",0); PlayerInfo[playerid][LoggedIn] = 1; PlayerInfo[playerid][Registered] = 1; SendClientMessage(playerid, green, "ACCOUNT: You are now registered, and have been automaticaly logged in"); PlayerPlaySound(playerid,1057,0.0,0.0,0.0); return 1; } return 1; } |
Quote:
dcmd_registre(playerid,params[]) { if (PlayerInfo[playerid][LoggedIn] == 1) return SendClientMessage(playerid,red,"COMPTE: Vous кtes dйjа inscrit et connectй po."); if (udb_Exists(PlayerName2(playerid))) return SendClientMessage(playerid,red,"COMPTE: Ce compte existe dйjа, s'il vous plaоt utilisez /login (mot de passe)."); if (strlen(params) == 0) return SendClientMessage(playerid,red,"COMPTE: utilisation correcte: /registre (mot de passe)"); if (strlen(params) < 4 || strlen(params) > 20) return SendClientMessage(playerid,red,"COMPTE: Mot de passe longueur doit кtre supйrieure а trois caractиres."); if (udb_Create(PlayerName2(playerid),params)) { new file[256],name[MAX_PLAYER_NAME], tmp3[100]; new strdate[20], year,month,day; getdate(year, month, day); GetPlayerName(playerid,name,sizeof(name)); format(file,sizeof(file),"/ladmin/users/%s.sav",udb_encode(name)); GetPlayerIp(playerid,tmp3,100); dini_Set(file,"ip",tmp3); // dini_Set(file,"password",params); dUserSetINT(PlayerName2(playerid)).("registered",1 ); format(strdate, sizeof(strdate), "%d/%d/%d",day,month,year); dini_Set(file,"RegisteredDate",strdate); dUserSetINT(PlayerName2(playerid)).("loggedin",1); dUserSetINT(PlayerName2(playerid)).("banned",0); dUserSetINT(PlayerName2(playerid)).("level",0); dUserSetINT(PlayerName2(playerid)).("LastOn",0); dUserSetINT(PlayerName2(playerid)).("money",0); dUserSetINT(PlayerName2(playerid)).("kills",0); dUserSetINT(PlayerName2(playerid)).("deaths",0); dUserSetINT(PlayerName2(playerid)).("hours",0); dUserSetINT(PlayerName2(playerid)).("minutes",0); dUserSetINT(PlayerName2(playerid)).("seconds",0); PlayerInfo[playerid][LoggedIn] = 1; PlayerInfo[playerid][Registered] = 1; SendClientMessage(playerid, green, "COMPTE: Vous кtes maintenant inscrit, et ont йtй automatiquement enregistrй dans."); PlayerPlaySound(playerid,1057,0.0,0.0,0.0); return 1; } return 1; } |
Postscript: I want to do the same with the login, I think no need to put the codes, but if you should need only have you to tell me.
Postscript 2: pardon my ignorance, but we were all newbies once, right?
PS 3: I speak English regularly, so please forgive my misspellings.