Započeo [IF] mariomako
•26. Jul 2010.Koristite /changepass [novi apssword]
1,219
pregleda
8
postova
Underboss
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
618
Postovi:
155
Teme:
Pridružio se:Apr. 2010
26. Jul 2010.
CMD:changepassword(playerid, params[])
{
if(!UserExists(playerid)) return SendClientMessage(playerid, COLOR_RED,"To ime nije registrirano napisi /register .");
if(!params) return SendClientMessage(playerid, COLOR_RED, "Tocnije: /changepassword [nova lozinka]");
if(PlayerInfo == 0) return SendClientMessage(playerid, COLOR_RED,"Nisi ulogiran!");
new FilePath;
format(FilePath, sizeof(FilePath), "Korisnici/%s.ini", PlayerName(playerid));
new password = num_hash(params);
PlayerInfo = password;
dini_IntSet(FilePath,"Password",PlayerInfo);
if (IgracInfo == 1)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "ÈÃôîðìà öè¼à :");
new string; format(string, sizeof(string), "ÓñïåøÃî ¼à ïðîìåÃèâòå âà øà òà ëîçèÃêà , Ãîâà òà ëîçèÃêà å: \'%s\'.", params);
SendClientMessage(playerid, COLOR_WHITE, string);
}
if (IgracInfo == 2)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Informacije:");
new string; format(string, sizeof(string), "Uspesno ste promenili password, novi password je: \'%s\'.", params);
SendClientMessage(playerid, COLOR_WHITE, string);
}
if (IgracInfo == 3)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Information:");
new string; format(string, sizeof(string), "Successful change your password, your new password is: \'%s\'.", params);
SendClientMessage(playerid, COLOR_WHITE, string);
}
return PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
}Ovo je moja komanda za mjenjanje password ali kad upisem samo /changepassword pobrisemi password a kad upisem /changepassword [neki password] tada radi sve normalno a sad me zanima kako da napravim kad upisem smo /changepassword da mi izage da sam krivo koristio komandu kako sto ima na neki servere korsitite /ban
Underboss
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
618
Postovi:
155
Teme:
Pridružio se:Apr. 2010
26. Jul 2010.
LordShigi wrote on July 26, 2010, 12:34 pm:
S obzirom da koristis ZCMD, stavi
if (isnull(params))gde to da stavim?
Crime Lord
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
951
Postovi:
25
Teme:
Pridružio se:Maj 2009
26. Jul 2010.
Evo ti gotova komanda:
CMD:changepassword(playerid, params[])
{
if(!UserExists(playerid)) return SendClientMessage(playerid, COLOR_RED,"To ime nije registrirano napisi /register .");
if(isnull(params)) return SendClientMessage(playerid, COLOR_RED, "Tocnije: /changepassword [nova lozinka]");
if(PlayerInfo == 0) return SendClientMessage(playerid, COLOR_RED,"Nisi ulogiran!");
new FilePath;
format(FilePath, sizeof(FilePath), "Korisnici/%s.ini", PlayerName(playerid));
new password = num_hash(params);
PlayerInfo = password;
dini_IntSet(FilePath,"Password",PlayerInfo);
if (IgracInfo == 1)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "ÈÃôîðìà öè¼à :");
new string; format(string, sizeof(string), "ÓñïåøÃî ¼à ïðîìåÃèâòå âà øà òà ëîçèÃêà , Ãîâà òà ëîçèÃêà å: \'%s\'.", params);
SendClientMessage(playerid, COLOR_WHITE, string);
}
if (IgracInfo == 2)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Informacije:");
new string; format(string, sizeof(string), "Uspesno ste promenili password, novi password je: \'%s\'.", params);
SendClientMessage(playerid, COLOR_WHITE, string);
}
if (IgracInfo == 3)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Information:");
new string; format(string, sizeof(string), "Successful change your password, your new password is: \'%s\'.", params);
SendClientMessage(playerid, COLOR_WHITE, string);
}
return PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
}Underboss
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
618
Postovi:
155
Teme:
Pridružio se:Apr. 2010
26. Jul 2010.
problem resen
a sada sam malo editao komandu pa zasto mi nalazi ove errore
a sada sam malo editao komandu pa zasto mi nalazi ove errore
E:\SAMP Server\PitBull Freeroam\gamemodes\pitbull.pwn(774) : error 029: invalid expression, assumed zeroCMD:changepassword(playerid, params[])
{
if(!UserExists(playerid))
else
{
if (IgracInfo == 1)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "/changepassword [nova lozinka]");
}
if (IgracInfo == 2)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "/changepassword [novi password]");
}
if (IgracInfo == 3)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "/changepassword [new password]");
}
}
if(isnull(params)) return SendClientMessage(playerid, COLOR_RED, "Tocnije: /changepassword [nova lozinka]");
if(PlayerInfo == 0) return SendClientMessage(playerid, COLOR_RED,"Nisi ulogiran!");
new FilePath;
format(FilePath, sizeof(FilePath), "Korisnici/%s.ini", PlayerName(playerid));
new password = num_hash(params);
PlayerInfo = password;
dini_IntSet(FilePath,"Password",PlayerInfo);
if (IgracInfo == 1)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "ÈÃôîðìà öè¼à :");
new string; format(string, sizeof(string), "ÓñïåøÃî ¼à ïðîìåÃèâòå âà øà òà ëîçèÃêà , Ãîâà òà ëîçèÃêà å: \'%s\'.", params);
SendClientMessage(playerid, COLOR_WHITE, string);
}
if (IgracInfo == 2)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Informacije:");
new string; format(string, sizeof(string), "Uspesno ste promenili password, novi password je: \'%s\'.", params);
SendClientMessage(playerid, COLOR_WHITE, string);
}
if (IgracInfo == 3)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Information:");
new string; format(string, sizeof(string), "Successful change your password, your new password is: \'%s\'.", params);
SendClientMessage(playerid, COLOR_WHITE, string);
}
return PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
}Crime Lord
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
951
Postovi:
25
Teme:
Pridružio se:Maj 2009
26. Jul 2010.
A da nam das mozda liniju?
I zasto pobogu koristis veliÄinu stringa 256 kad samp ne dopuÅ¡ta da ispiÅ¡eÅ¡ string veći od 128(i to je previse jer ni tolko slova nemas).
I zasto pobogu koristis veliÄinu stringa 256 kad samp ne dopuÅ¡ta da ispiÅ¡eÅ¡ string veći od 128(i to je previse jer ni tolko slova nemas).
Underboss
Balkan SA:MP
SA-MP Doprinos
Balkan SA:MP
SA-MP DoprinosNovi Član
240 / 250 XP
Početnik(0)
618
Postovi:
155
Teme:
Pridružio se:Apr. 2010
26. Jul 2010.
evo sada cela komanda ne nalazi errore
ali kad idem /changepass od svi poruke mi izage po jedna i plus mi obrise password
ali kad idem /changepass od svi poruke mi izage po jedna i plus mi obrise password
CMD:changepassword(playerid, params[])
{
if(UserExists(playerid)) {
if(IgracInfo == 1)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Îâà à êîðèñÃè÷êî èìå ÃÃ¥ Ã¥ ðåãèñòèðà Ãî.");
}
if (IgracInfo == 2)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Ovo korisnicko ime nije registirano.");
}
if (IgracInfo == 3)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "This username is not registred.");
}
}
if(isnull(params)) {
if(IgracInfo == 1)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "/changepassword [Ãîâà ëîçèÃêà ]");
}
if (IgracInfo == 2)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "/changepassword [novi password]");
}
if (IgracInfo == 3)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "/changepassword [new password]");
}
}
if(PlayerInfo == 0) return SendClientMessage(playerid, COLOR_RED,"Nisi ulogiran!");
new FilePath;
format(FilePath, sizeof(FilePath), "Korisnici/%s.ini", PlayerName(playerid));
new password = num_hash(params);
PlayerInfo = password;
dini_IntSet(FilePath,"Password",PlayerInfo);
if (IgracInfo == 1)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "ÈÃôîðìà öè¼à :");
new string; format(string, sizeof(string), "ÓñïåøÃî ¼à ïðîìåÃèâòå âà øà òà ëîçèÃêà , Ãîâà òà ëîçèÃêà å: \'%s\'.", params);
SendClientMessage(playerid, COLOR_WHITE, string);
}
if (IgracInfo == 2)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Informacije:");
new string; format(string, sizeof(string), "Uspesno ste promenili password, novi password je: \'%s\'.", params);
SendClientMessage(playerid, COLOR_WHITE, string);
}
if (IgracInfo == 3)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Information:");
new string; format(string, sizeof(string), "Successful change your password, your new password is: \'%s\'.", params);
SendClientMessage(playerid, COLOR_WHITE, string);
}
return PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
}Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava