Register problem - 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: Register problem (
/showthread.php?tid=414562)
Register problem -
omarnor89 - 09.02.2013
Well i am playing with my friends in private server and i am using NG:RP with my edit the problem is when new player joining he must follow the registeration steps passwords,gender,date but when he ask him So what are you Male or Female ,when the player type male or female the server doesn't respond (Doesn't callbacks or doesn't save it at the stats) its keep show male or female not go to next step
pawn Код:
if(RegistrationStep[playerid] > 0)
{
if(RegistrationStep[playerid] == 1)
{
if (strcmp("male", text, true) == 0)
{
PlayerInfo[playerid][pSex] = 1;
SendClientMessageEx(playerid, COLOR_YELLOW2, "So, you're a male right?");
SendClientMessageEx(playerid, COLOR_GREEN, "Please tell me your D-O-B (Ex: 1/1/1990)");
RegistrationStep[playerid] = 2;
return 0;
}
else if (strcmp("female", text, true) == 0)
{
PlayerInfo[playerid][pSex] = 2;
SendClientMessageEx(playerid, COLOR_YELLOW, "So, you're a female right?");
SendClientMessageEx(playerid, COLOR_GREEN, "Please tell me your D-O-B (Ex: 1/1/1990)");
RegistrationStep[playerid] = 2;
return 0;
}
else
{
SendClientMessageEx(playerid, COLOR_REALRED, "Are you a male or female? Type in your choice.");
}
return 0;
}
else if(RegistrationStep[playerid] == 2)
{
new year, month,day;
getdate(year, month, day);
new DateInfo[3][20];
splits(text, DateInfo, '/');
if(year - strval(DateInfo[2]) > 100 || strval(DateInfo[2]) < 1 || strval(DateInfo[2]) >= year)
{
SendClientMessageEx(playerid, COLOR_LIGHTRED, "Please tell me your D-O-B (Ex: 1/1/1990)");
return 0;
}
new check = year - strval(DateInfo[2]);
if(check == year)
{
SendClientMessageEx(playerid, COLOR_GREEN, "Please tell me your D-O-B (Ex: 1/1/1990)");
return 0;
}
if(strval(DateInfo[1]) > month)
{
check -= 1;
}
else if(strval(DateInfo[1]) == month && strval(DateInfo[0]) > day)
{
check -= 1;
}
PlayerInfo[playerid][pAge] = check;
PlayerInfo[playerid][pOrigin] = 0;
format(string, sizeof(string), "Ok, so you are %d year old.",PlayerInfo[playerid][pAge]);
SendClientMessageEx(playerid, COLOR_YELLOW2, string);
SendClientMessageEx(playerid, COLOR_LIGHTRED, "Thanks for filling in all the information, Welcome to California Streets Roleplay!");
//SendClientMessageEx(playerid, TEAM_CYAN, "We Hope Your Enjoy Your Stay Make Sure To Check Out Are Fourms");
RegistrationStep[playerid] = 0;
SetPlayerVirtualWorld(playerid, 0);
ClearChatbox(playerid);
SendClientMessageEx(playerid, COLOR_YELLOW, "Welcome to California Street Roleplay");
SendClientMessageEx(playerid, COLOR_YELLOW, "Type /begin to start your RP life");
ShowTutGUIBox(playerid);
ShowTutGUIFrame(playerid, 1);
TutStep[playerid] = 1;
/*Los Santos (Camera)
Streamer_UpdateEx(playerid, 1607.0160,-1510.8218,207.4438);
SetPlayerPos(playerid, 1607.0160,-1510.8218,-10.0);
SetPlayerCameraPos(playerid, 1850.1813,-1765.7552,81.9271);
SetPlayerCameraLookAt(playerid, 1607.0160,-1510.8218,207.4438);
return 0;*/
}
return 0;
Re: Register problem -
omarnor89 - 10.02.2013
22 viewers and no answer ?
Re: Register problem -
dusk - 10.02.2013
using "pawn /pawn" instead of quote would be nicer...its easier to understand the script for us
Re: Register problem -
omarnor89 - 11.02.2013
i want fucking answer................
Re: Register problem -
MP2 - 11.02.2013
Quote:
Originally Posted by omarnor89
i want fucking answer................
|
You're not going to get one from me, or anyone else with any sense. You sir, are an impatient, rude, stupid prick.
Re: Register problem -
omarnor89 - 12.02.2013
Sir i am not i just want simple answer this guy telling me put pawn on code but i already did please i just need answer
Re: Register problem -
MP2 - 12.02.2013
He was asking you to use [ pawn ] tags instead of [ quote ] tags as it shows syntax highlighting which makes code easier to read, which makes it easier to help you. Indenting your code also helps.
Re: Register problem -
omarnor89 - 12.02.2013
done now please some help