Koristite /changepass [novi apssword]

26. Jul 2010.
1,205
pregleda
8
postova
mariomako
5
Underboss
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
LordShigi
5
Crime Lord
26. Jul 2010.
S obzirom da koristis ZCMD, stavi
if (isnull(params))
mariomako
5
Underboss
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?
LordShigi
5
Crime Lord
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);
}
Johnâ„¢
5
Godfather
26. Jul 2010.
Ili samo makni ovaj ! ispred
params
mariomako
5
Underboss
26. Jul 2010.
problem resen

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 zero

CMD: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);
}
LordShigi
5
Crime Lord
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).
mariomako
5
Underboss
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
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

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha