Help im confused - 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: Help im confused (
/showthread.php?tid=397086)
Help im confused -
NinjaChicken - 03.12.2012
ok i have this
pawn Код:
ShowPlayerDialog(playerid, STARTERGIFT, DIALOG_STYLE_LIST, "Starter Offer", " Phone\nPrivate Radio\nPhone Book\n10 Spray Cans", "Yes", "No");
and i want it to do this but its not working
pawn Код:
if(dialogid == STARTERGIFT)
{
if(response)
{
new randphone = 1000 + random(9999);//minimum 1000 max 9999
ReplacePH(PlayerInfo[playerid][pPnumber], randphone);
PlayerInfo[playerid][pPnumber] = randphone;
format(string, sizeof(string), "your new phone number is %d.", randphone);
PlayerInfo[playerid][pPhoneBook] = 1;
PlayerInfo[playerid][pSpraycan] = 10;
SendClientMessageEx(playerid, COLOR_TWAZURE, "HINT: Type /pr to talk over your portable radio.");
SendClientMessageEx(playerid, COLOR_TWAZURE, "HINT: Type /setfreq to set the frequency of your portable radio.");
PlayerInfo[playerid][pRadio] = 1;
}
}
Re: Help im confused -
gtakillerIV - 03.12.2012
Show us your define of "STARTERGIFT".
Re: Help im confused -
NinjaChicken - 03.12.2012
urgh thats all set up fine the dialog shows, just when i click yes nothing happens
Re: Help im confused -
Faisal_khan - 03.12.2012
pawn Код:
if(dialogid == STARTERGIFT)
{
if(response)
{
new randphone = 1000 + random(9999);//minimum 1000 max 9999
ReplacePH(PlayerInfo[playerid][pPnumber], randphone);
PlayerInfo[playerid][pPnumber] = randphone;
format(string, sizeof(string), "your new phone number is %d.", randphone);
PlayerInfo[playerid][pPhoneBook] = 1;
PlayerInfo[playerid][pSpraycan] = 10;
SendClientMessageEx(playerid, COLOR_TWAZURE, "HINT: Type /pr to talk over your portable radio.");
SendClientMessageEx(playerid, COLOR_TWAZURE, "HINT: Type /setfreq to set the frequency of your portable radio.");
PlayerInfo[playerid][pRadio] = 1;
}
return 1;
}