SA-MP Forums Archive
Helpme ! - 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: Helpme ! (/showthread.php?tid=99292)



Helpme ! - jabbawockeez - 26.09.2009

i'm thai
to day i have a problem. i make a new gamemode. i need register system but i have /register.
this usage /register <password>
Ex.

if (strcmp(cmd, "/register", true) ==0 )
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 1)
{
SendClientMessage(playerid, COLOR_WHITE, "SERVER: You are already logged in.");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "users/%s.ini", sendername);
new File: hFile = fopen(string, io_read);
if (hFile)
{
SendClientMessage(playerid, COLOR_YELLOW, "That Username is already taken, please choose a different one.");
fclose(hFile);
return 1;
}
new tmppass[64];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /register [password]");
return 1;
}
strmid(tmppass, tmp, 0, strlen(cmdtext), 255);
//Encrypt(tmppass);
OnPlayerRegister(playerid,tmppass);
}
return 1;
}

i see that new system is Send Question to need password.
next. player can f6 and typing password Ex. 1234
this my problem hot to make - -*
* sorry bad english



Re: Helpme ! - jabbawockeez - 26.09.2009

setpassword with nocommands
hot to make ? thank.