09.02.2013, 21:09
(
Последний раз редактировалось omarnor89; 12.02.2013 в 00:16.
)
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;