SA-MP Forums Archive
Help - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help (/showthread.php?tid=109455)



Help - gedux123775 - 20.11.2009

Help!!
Bed login system do not connect NPC bot
Quote:

if(strcmp(cmdtext, "/login", true,6)==0)
{
if(playerDB[playerid][authstate]!=0){SendClientMessage(playerid,COLOR,"Jus jau prisijunges(-usi)"); return 1;}
new name[MAX_PLAYER_NAME],file[128];
GetPlayerName(playerid,name,sizeof(name));
format(file,sizeof(file),"saves/user/%s.ini",name);
if(!fexist(file)){SendClientMessage(playerid,COLOR ,"Jus neregistruotas, naudokite /register [pass]"); return 1;}
if(cmdtext[6]==0){SendClientMessage(playerid,COLOR,"prisijungti galite taip: /login [pass]"); return 1;}
if(CheckPass(file,cmdtext[7]))
{
new exp = dini_Int(file,"Xp");
if(dini_Int(file,"Admin") == 1) playerDB[playerid][admin]=true;
if(playerDB[playerid][admin])
{
SendClientMessage(playerid,GREEN,"Sveiki sugrize, administratoriu komandos: /akomandos Smiley.");
}
if(playerDB[playerid][admin])
{
SendClientMessage(playerid,0xD9E916FF,"Sveiki sugrize, moderatorių komandos: /vipkomandos");
}else{
SendClientMessage(playerid,COLOR,"Prisijungete, dabar galite testi.");
}
if(exp == -1) playerDB[playerid][authstate]=1; else
playerDB[playerid][authstate]=2;
return 1;
}
SendClientMessage(playerid,RED,"Slaptazodis neteisingas");
return 1;
}

What's wrong?