OnDialogRespone - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: OnDialogRespone (
/showthread.php?tid=143027)
OnDialogRespone -
DarkPower - 20.04.2010
When i try to make this code i get 26 ERRORS, before i add
Код:
if(RegistrationStep[playerid] > 0)
{
if(RegistrationStep[playerid] == 1)
{
evrything was work fine, can somebody help me
pawn Код:
if(dialogid == 5510 && response)
{
switch(listitem)
{
case 0:
{
if(RegistrationStep[playerid] > 0)
{
if(RegistrationStep[playerid] == 1)
{
PlayerPlaySound(playerid, 1187, 0, 0, 10);
PlayerInfo[playerid][pSex] = 1;
ClearChatbox(playerid, 8);
ShowPlayerDialog(playerid,5511,DIALOG_STYLE_LIST,"Koliko imas godina","13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30","Odaberi","Odustani");
ClearChatbox(playerid, 2);
new maleskin;
maleskin = random(sizeof(CivMalePeds));
SetPlayerSkin(playerid, maleskin);
PlayerInfo[playerid][pChar] = maleskin;
RegistrationStep[playerid] = 2;
return 0;
}
case 1:
{
PlayerPlaySound(playerid, 1187, 0, 0, 10);
PlayerInfo[playerid][pSex] = 2;
ClearChatbox(playerid, 8);
ShowPlayerDialog(playerid,5511,DIALOG_STYLE_LIST,"Koliko imas godina","13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30","Odaberi","Odustani");
ClearChatbox(playerid, 2);
new femaleskin;
femaleskin = random(sizeof(CivFemalePeds));
SetPlayerSkin(playerid, femaleskin);
SetPlayerSkin(playerid, femaleskin);
PlayerInfo[playerid][pChar] = femaleskin;
RegistrationStep[playerid] = 2;
return 0;
}
}
}
Re: OnDialogRespone -
DarkPower - 21.04.2010
BUMP
Re: OnDialogRespone -
Correlli - 21.04.2010
You're missing two closing brackets for case 0.
Re: OnDialogRespone -
DarkPower - 21.04.2010
Can you fix that for me?
Re: OnDialogRespone -
CAR - 21.04.2010
pawn Код:
if(dialogid == 5510 && response)
{
switch(listitem)
{
case 0:
{
if(RegistrationStep[playerid] > 0)
{
if(RegistrationStep[playerid] == 1)
{
PlayerPlaySound(playerid, 1187, 0, 0, 10);
PlayerInfo[playerid][pSex] = 1;
ClearChatbox(playerid, 8);
ShowPlayerDialog(playerid,5511,DIALOG_STYLE_LIST,"Koliko imas godina","13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30","Odaberi","Odustani");
ClearChatbox(playerid, 2);
new maleskin;
maleskin = random(sizeof(CivMalePeds));
SetPlayerSkin(playerid, maleskin);
PlayerInfo[playerid][pChar] = maleskin;
RegistrationStep[playerid] = 2;
return 0;
}
}
}
case 1:
{
PlayerPlaySound(playerid, 1187, 0, 0, 10);
PlayerInfo[playerid][pSex] = 2;
ClearChatbox(playerid, 8);
ShowPlayerDialog(playerid,5511,DIALOG_STYLE_LIST,"Koliko imas godina","13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25 6\n27\n28\n29\n30","Odaberi","Odustani");
ClearChatbox(playerid, 2);
new femaleskin;
femaleskin = random(sizeof(CivFemalePeds));
SetPlayerSkin(playerid, femaleskin);
SetPlayerSkin(playerid, femaleskin);
PlayerInfo[playerid][pChar] = femaleskin;
RegistrationStep[playerid] = 2;
return 0;
}
}
}
Try this,
You only have to change te tabs because I used spaces...
Re: OnDialogRespone -
Correlli - 21.04.2010
pawn Код:
if(dialogid == 5510 && response)
{
new
skin;
switch(listitem)
{
case 0:
{
if(RegistrationStep[playerid] == 1)
{
PlayerPlaySound(playerid, 1187, 0, 0, 10);
PlayerInfo[playerid][pSex] = 1;
ClearChatbox(playerid, 8);
ShowPlayerDialog(playerid, 5511, DIALOG_STYLE_LIST, "Koliko imas godina", "13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30", "Odaberi", "Odustani");
ClearChatbox(playerid, 2);
skin = random(sizeof(CivMalePeds));
SetPlayerSkin(playerid, skin);
PlayerInfo[playerid][pChar] = skin;
RegistrationStep[playerid] = 2;
return 0;
}
}
case 1:
{
PlayerPlaySound(playerid, 1187, 0, 0, 10);
PlayerInfo[playerid][pSex] = 2;
ClearChatbox(playerid, 8);
ShowPlayerDialog(playerid, 5511, DIALOG_STYLE_LIST, "Koliko imas godina", "13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30", "Odaberi", "Odustani");
ClearChatbox(playerid, 2);
skin = random(sizeof(CivFemalePeds));
SetPlayerSkin(playerid, skin);
PlayerInfo[playerid][pChar] = skin;
RegistrationStep[playerid] = 2;
return 0;
}
}
}
Check for RegistrationStep[playerid] > 0 isn't needed, because after that you're checking if RegistrationStep[playerid] is equal to 1. I've also used one variable for both skins: male and female, there isn't need for two variables.
Also, there isn't need for another SetPlayerSkin function right after the first one.