Creating 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)
+--- Thread: Creating Help (
/showthread.php?tid=442305)
Creating Help -
San1 - 06.06.2013
How can i fix the Gender Selection and Age Selection on my Gamemode
I added Age and Gender on the pInfo Enum
Код:
ShowPlayerDialog(playerid,DIALOG_REGISTER2,DIALOG_STYLE_MSGBOX,"Select Your Character's Gender","Select the gender for your character","Male","Female");
I want Male=1 and female = 2
How can i fix this to Make it where it select Male it will be id 1 and female id 2
I dont want the skin to change only the gender in /stats
Код:
case DIALOG_REGISTER2:
{
if ( !response ) return Kick ( playerid );
if( response )
{
if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pModel], PlayerInfo[playerid][pPos_x], PlayerInfo[playerid][pPos_y], PlayerInfo[playerid][pPos_z], 1.0, -1, -1, -1, -1, -1, -1);
SpawnPlayer(playerid);
SendClientMessage(playerid,COL_GREEN,"You have successfully logged in and have been spawned at your previous spot");
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"Login","{FF0055}You have entered an incorrect password.\nType your password below to login.","Login","Quit");
}
return 1;
}
}
}
return 1;
}
Re: Creating Help -
Facerafter - 06.06.2013
This is what i got OnDialogResponse
pawn Код:
if(dialogid == DIALOG_SEX)
{
if(response)
{
PlayerInfo[playerid][pSex] = 1;
SendClientMessage(playerid, -1, "INFO: You are {3BB9FF}male.");
SetPlayerSkin(playerid, 60);
PlayerInfo[playerid][pSkin] = 60;
ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "- Age -","How old are you??\n{FF0000}(( 16 - 100 ))","Answer","Quit");
}
else
{
PlayerInfo[playerid][pSex] = 2;
SendClientMessage(playerid, -1, "INFO: You are {3BB9FF}female.");
SetPlayerSkin(playerid, 233);
PlayerInfo[playerid][pSkin] = 233;
ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "- Age -","How old are you??\n{FF0000}(( 16 - 100 ))","Answer","Quit");
}
}
Re: Creating Help -
San1 - 06.06.2013
I fixed it thanks for all ur support bro and i fixed the Spawn saving system