Range of Points Problem -
KampfMopZ - 27.11.2011
Hey Guys,
i have a Problem, i want to make a weaponshop for eache faction, the command is /ausrьsten, it opens a dialog.
they should only be able to open the dialog in a pickup/range of a point an i made this:
Код:
new Float:waffcp[][3] =
{
{-1671.7324,1338.5049,7.1875},
{-1646.9674,700.4893,-4.9063},
{-1509.8167,267.4948,7.1875},
{-2048.7820,67.2123,28.6456},
{-2224.5933,-104.9689,35.3203},
{-2452.9697,504.2988,30.0811},
{-2593.2053,642.1595,14.4531},
{-2207.3303,676.5793,49.4375}
};
Код:
//----------------------------------------------------------------------------------------------------------------------Ausrьsten
if (strcmp("/ausrьsten", cmdtext, true, 10) == 0)
{
new weapsl = (sizeof(waffcp));
if (!IsPlayerInRangeOfPoint(playerid, 7.0, waffcp[weapsl][0], waffcp[weapsl][1], waffcp[weapsl][2]));
{
return SendClientMessage(playerid, COLOR_RED, "Geh in den Lieferpunkt!");
}
ShowPlayerDialog(playerid,Dialog_Weaps,2,"Was brauchst du?","Deagel (75 Schuss) $279\nAk47 (150 Schuss) $429\nGewehr (75 Schuss) $389\nBaseballschlдger $29\nSMG (200 Schuss) $459\nSPAS-12 (45 Schuss) 65$\nPolizeipacket\nBundeswehrpacket\nFBI-Packet\nBandagen 19$\nKevlarweste 219$","Kaufen","Ende");
return 1;
}
Thank you!
Re: Range of Points Problem -
manchestera - 27.11.2011
You have no respone yoy need something like this
you just need to change the respone to what you want it to do
Код:
if(dialogid == TELE)
{
if(response == 1)
{
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid,TUNES,DIALOG_STYLE_LIST,"Tuning Shops!","Transfender Los Santos \nTransfender Las Venturas \nWheel Arch Angels \nLoco Low Riders","Enter","Close");
}
case 1:
{
ShowPlayerDialog(playerid,LASA,DIALOG_STYLE_LIST,"Places Around San Andreas!","Los Santos \nLos Santos Airport \nSan Ferrio \nSan Ferrio Airport \nLas Venturas \nLas Venturas Airport","Enter","Close");
}
case 2:
{
ShowPlayerDialog(playerid,BJS,DIALOG_STYLE_LIST,"Big Jumps!","RichMans Jump \nSky Scrapper \nThe Strip \nUp, Up, Up, Shit Down!!!! \nCrane Jump \nMini Jump \nMarine Base Jump \nDesert Jump \nRiver Jump \nUp Up and Away","Enter","Close");
}
case 3:
{
ShowPlayerDialog(playerid,BASE,DIALOG_STYLE_LIST,"Base Jumps!","Base Jump One \nBase Jump Two \nBase Jump Three \nBase Jump Four \nBase Jump Five \nBase Jump Six \nBase Jump Seven \nBase Jump Eight \nBase Jump Nine","Enter","Close");
}
case 4:
{
ShowPlayerDialog(playerid,PARK,DIALOG_STYLE_LIST,"StuntParks!","Los Santos Airport \nSan Ferrio Airport \nLos Venturas Airport \nOld Airfield \nDisney StuntPark","Enter","Close");
}
case 5:
{
ShowPlayerDialog(playerid,DM,DIALOG_STYLE_LIST,"StuntParks!","Madness DeathMatch","Enter","Close");
}
}
}
}
Re: Range of Points Problem -
MP2 - 27.11.2011
pawn Код:
if (strcmp("/ausrьsten", cmdtext, true, 10) == 0)
{
for(new i=0; i<sizeof(waffcp); i++)
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, waffcp[i][0], waffcp[i][1], waffcp[i][2]));
{
ShowPlayerDialog(playerid,Dialog_Weaps,2,"Was brauchst du?","Deagel (75 Schuss) $279\nAk47 (150 Schuss) $429\nGewehr (75 Schuss) $389\nBaseballschlдger $29\nSMG (200 Schuss) $459\nSPAS-12 (45 Schuss) 65$\nPolizeipacket\nBundeswehrpacket\nFBI-Packet\nBandagen 19$\nKevlarweste 219$","Kaufen","Ende");
return 1;
}
}
SendClientMessage(playerid, COLOR_RED, "Geh in den Lieferpunkt!");1
return 1;
}
Un-tested.
AW: Range of Points Problem -
KampfMopZ - 27.11.2011
now i get a warning : Empty statement, for
Код:
if(IsPlayerInRangeOfPoint(playerid, 7.0, waffcp[i][0], waffcp[i][1], waffcp[i][2]));
@manchestera i know but thats not the bugged part, i wont post my complete script here.
Thanks!