01.05.2011, 04:03
hi,
damn maybe im just too tired now xD but i cant fugure this out.
I want that itgives me the first weapon that is listed on the list if i enter 1 into the dialog.
The 2nd weapon if i enter 2 and so on.
But it just does not work. Nothing happens.
regards.
damn maybe im just too tired now xD but i cant fugure this out.
I want that itgives me the first weapon that is listed on the list if i enter 1 into the dialog.
The 2nd weapon if i enter 2 and so on.
But it just does not work. Nothing happens.
pawn Код:
new Weaponsdialog = 1;
public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
new Weaponsdialogue[710] = "{CD5555}Katana - {CDAF95}15800$\n{CD5555}Chainsaw - {CDAF95}2500$\n...
foreach (Player, i)
{
if(IsPlayerInRangeOfPoint(i,2,311.2411,-165.3235,999.6010))
{
ShowPlayerDialog(i, Weaponsdialog, DIALOG_STYLE_INPUT, "{CD5555}Weapon {CDAF95}Price",Weaponsdialogue,"Buy", "Cancel");
}
}
return 1;
}
//OnDialogResponse
if(dialogid == Weaponsdialog)
{
if(response)
{
if(strcmp("1", inputtext, true))
{
GivePlayerWeapon(playerid,8,0);
}
else if(strcmp("2", inputtext, true))
{
GivePlayerWeapon(playerid,9,0);
}
// and so on...