14.09.2012, 05:13
ok i have it so after they select male, then there age they spawn and a dialog pops up allowing them to enter a skin id they wish to use
ONDIALOGRESPONSE
SPAWN PART
ONDIALOGRESPONSE
pawn Код:
if(dialogid == 3497)
{
if(response)
{
new skinid = strval(inputtext);
if(!skinid) {
ShowPlayerDialog(playerid, 3497, DIALOG_STYLE_INPUT, "Free starter skin", "Please input the Skin ID you wish to use", "Select", "");
}
else
{
if(skinid < 0 || skinid > 299) {
ShowPlayerDialog(playerid, 3497, DIALOG_STYLE_INPUT, "Free starter skin", "Please input the Skin ID you wish to use\nHint: Skin IDs range from 0 - 299", "Select", "");
}
else
{
SetPlayerSkin(playerid, skinid);
PlayerInfo[playerid][pModel] = skinid;
}
}
}
else
{
ShowPlayerDialog(playerid, 3497, DIALOG_STYLE_INPUT, "Free starter skin", "Please input the Skin ID you wish to use", "Select", "");
}
return 1;
}
pawn Код:
else if(dialogid == REGISTERAGE)
{
if(response)
{
PlayerInfo[playerid][pAge] = listitem+18;
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, now you start playing!");
HideTutGUIBox(playerid);
HideTutGUIFrame(playerid, 23);
TutStep[playerid] = 0;
PlayerInfo[playerid][pTut] = 1;
gOoc[playerid] = 0; gNews[playerid] = 0; gFam[playerid] = 0;
ClearChatbox(playerid);
TogglePlayerControllable(playerid, 1);
SetCamBack(playerid);
DeletePVar(playerid, "MedicBill");
SetPlayerColor(playerid,TEAM_HIT_COLOR);
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid, 1714.88,-1879.91,13.57);
SetPlayerFacingAngle(playerid, 359.4621);
SetCameraBehindPlayer(playerid);
SetPlayerVirtualWorld(playerid, 0);
ShowPlayerDialog(playerid, 3497, DIALOG_STYLE_INPUT, "{0000FF}You have been Refunded (/stats){FFFFFF} Free starter skin", "Please input the Skin ID you wish to use", "Choose", "Cancel");
SendClientMessageEx(playerid, COLOR_RED, "Note: You can change it later by going inside a clothes shop!");