Command not working - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Command not working (
/showthread.php?tid=412305)
Command not working -
dusk - 01.02.2013
pawn Код:
CMD:login(playerid,params[])
{
new string[256];
new string1[128];
string = dini_Get(File,"Password:");
if(sscanf(params,"%s",string1)) SendClientMessage(playerid,0x00FF00FF,"Usage: /login [Password]");
else
{
if(strcmp(string,string1,true))
{
SendClientMessage(playerid,0x00FF00FF,"You succesfully logged in");
}
if(!strcmp(string,string1,true))
{
SendClientMessage(playerid,0x00FF00FF,"Invalid password");
}
}
return 1;
}
This is my script,and no matter what i type it says "Invalid Password"
Re: Command not working -
dusk - 01.02.2013
so i changed it to this:
pawn Код:
if(strcmp(string,string1,true)==0)
and now nothing happens,doesn't matter if the password is correct or no
Re: Command not working -
dusk - 01.02.2013
nah,i want to make this one work,it will never be used anyway,im just trying to learn.If you can just tell me what do i have to change.
Although,what would you recommend?