public SetPlayerSpawn(playerid)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pTut] == 0)
{
gOoc[playerid] = 1; gNews[playerid] = 1; gFam[playerid] = 1;
TogglePlayerControllable(playerid, 0);
RegistrationStep[playerid] = 1;
ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Registration","Let's get started, what is your sex?","Male","Female");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(RegistrationStep[playerid] > 0)
{
new sendername[MAX_PLAYER_NAME];
new string[256];
if(RegistrationStep[playerid] == 1)
{
if(dialogid==1 && response==1)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[playerid][pSex] = 1;
format(string, sizeof(string), "So %s, You are a male.", sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
RegistrationStep[playerid] = 2;
SetPlayerSkin(playerid, 60);
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Registration","When were you born?","Next Step","");
return 0;
}
else if(dialogid=1 && response==0)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[playerid][pSex] = 2;
format(string, sizeof(string), "So %s, You are a female.", sendername);
SendClientMessage(playerid, COLOR_WHITE, string);
RegistrationStep[playerid] = 2;
SetPlayerSkin(playerid, 91);
ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Registration","When were you born?","Next Step","");
return 0;
}
}
else if(RegistrationStep[playerid] == 2)
{
new year, month,day;
getdate(year, month, day);
new DateInfo[3][20];
split(DateInfo, '/');
if(dialogid==2 && response==strvalEx(DateInfo[1]) == month && strvalEx(DateInfo[0]) > day)
{
check -= 1;
}
PlayerInfo[playerid][pAge] = check;
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "So %s, You have %d years old.", sendername, PlayerInfo[playerid][pAge]);
SendClientMessage(playerid, COLOR_WHITE, string);
RegistrationStep[playerid] = 3;
ShowPlayerDialog(playerid,3,DIALOG_STYLE_MSGBOX,"Registration","Where do you wish to be spawned?","Los Santos","San Fierro");
return 0;
}
else if(RegistrationStep[playerid] == 3)
{
if((dialogid==3 && response==1)
{
PlayerInfo[playerid][pOrigin] = 1;
SendClientMessage(playerid, COLOR_WHITE, "Ok, so you were been spawned in Los Santos.");
SendClientMessage(playerid, COLOR_1GREEN, "*** Now it's time for tutorial.");
RegistrationStep[playerid] = 0;
TutTime[playerid] = 1;
return 0;
}
else if(dialogid==3 && response==0)
{
PlayerInfo[playerid][pOrigin] = 2;
SendClientMessage(playerid, COLOR_WHITE, "Ok, so you were been spawned in San Fierro.");
SendClientMessage(playerid, COLOR_1GREEN, "*** Now it's time for tutorial.");
RegistrationStep[playerid] = 0;
TutTime[playerid] = 1;
return 0;
}
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(RegistrationStep[playerid] > 0)
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1)
{
if(RegistrationStep[playerid] == 3)
|
@[UG]Scripter still doesn't work...
@GangsTa[MD] no i want to make the system in a GF edit I need at born date response some help... |