SA-MP Forums Archive
help with a command and dialog - 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 with a command and dialog (/showthread.php?tid=463910)



help with a command and dialog - RafaelZam - 14.09.2013

hi guys
i need help with something,
i'm doing this cmd !
pawn Код:
CMD:baseattack(playerid, params[])
 {
  if(gPlayerClass[playerid] != Spy) return SendClientMessage(playerid, COLOR_red, " you cant use this command, only spy class can use it");
  {
    ShowPlayerDialog(playerid, 1001, DIALOG_STYLE_LIST, "Choose a TEAM", "\nTeam 1\nteam 2\nteam 3\nteam4\n team5\n","Choose","Cancel");
    GivePlayerWeapon(playerid, 46, 1);
    SendClientMessage(playerid, COLOR_red2, "parachute added");
  }
  return 1;
 }
i have not problem with this (i guess)
here the dialog
pawn Код:
if(dialogid == 1001)
{
if(response)
{
if(listitem == 0)
{
SetPlayerPos(playerid,-845.4827,64.3361,83.0848);
GivePlayerMoney(playerid, -5000);
SendClientMessage(playerid, COLOR_red2, "now attack him !!!!!! this is sparta !! :D! have fun");
}
if(listitem == 1)
{
SetPlayerPos(playerid,-996.1952,29.6250,223.4596);
GivePlayerMoney(playerid, -5000);
SendClientMessage(playerid, COLOR_red2, "now attack him !!!!!! this is sparta !! :D! have fun");
}
if(listitem == 2)
{
SetPlayerPos(playerid,-2258.9268,2369.1401,5.1497);
GivePlayerMoney(playerid, -5000);
SendClientMessage(playerid, COLOR_red2, "now attack him !!!!!! this is sparta !! :D! have fun");
}
if(listitem == 3)
{
SetPlayerPos(playerid,-1464.7240,2593.2456,55.8359);
GivePlayerMoney(playerid, -5000);
SendClientMessage(playerid, COLOR_red2, "now attack him !!!!!! this is sparta !! :D! have fun");
}
if(listitem == 4)
{
SetPlayerPos(playerid,-2254.6904,2341.6365,4.8125,30.4450);
GivePlayerMoney(playerid, -5000);
SendClientMessage(playerid, COLOR_red2, "now attack him !!!!!! this is sparta !! :D! have fun");
}
}
}
return 1;
}
no errors n pawn.exe, but my problem is that
i did the cmd in game and shows only select your team and i select him and nothing idk what happen
help me pls
sorry for my bad English//


Respuesta: help with a command and dialog - RafaelZam - 14.09.2013

bump help pls


Re: help with a command and dialog - Dragonsaurus - 14.09.2013

Maybe dialogids conflict with each other. Change the 1001 to another number.


Respuesta: help with a command and dialog - RafaelZam - 14.09.2013

nope, don't work


Respuesta: help with a command and dialog - RafaelZam - 14.09.2013

Solved----