Help :D
#1

Hey i got some problem with my login command it give me an error when i do /login [password] with correct password it just says "wrong password"

Код:
dcmd_login(playerid,params[])
{
	new file[256],password,cpassword[24];
	format(file,sizeof(file),"Roleplay/Users/%s.ini",PlayerName(playerid));
	if(!dini_Exists(file)) return SendClientMessage(playerid,COLOR_YELLOW,"You are not Registered");
  if(sscanf(params, "s", password)) return SendClientMessage(playerid, COLOR_YELLOW, "Usage: \"/Login [Password]\"");
  if(password != format(cpassword, 24, dini_Get(file,"password"))) return SendClientMessage(playerid,COLOR_YELLOW,"Wrong Password");
  SendClientMessage(playerid,COLOR_GREEN,"Login Complete");
	return 1;
}
Reply
#2

Please?
Reply
#3

if(password != format(cpassword, 24, dini_Get(file,"password")))
edit to

if(!strcmp(password,dini_Get(file,"password"),size of(password),false))
Reply
#4

Quote:
Originally Posted by yezizhu
if(password != format(cpassword, 24, dini_Get(file,"password")))
edit to

if(!strcmp(password,dini_Get(file,"password"),size of(password),false))
Код:
C:\Documents and Settings\Filip\Skrivbord\Samp-Files\Samp servers\gamemodes\roleplay.pwn(295) : error 035: argument type mismatch (argument 1)
C:\Documents and Settings\Filip\Skrivbord\Samp-Files\Samp servers\gamemodes\roleplay.pwn(295) : error 035: argument type mismatch (argument 2)
Reply
#5

hmm may be edit to
if(!strcmp(strval(password), dini_Get(file,"password"), sizeof(password), false))
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)