20.07.2010, 03:48
Tenta esse :
pawn Код:
#include <a_samp>
new weapons;
public OnFilterScriptInit()
{
weapons = CreatePickup(1242,1,2176.109375,1618.991210,999.976562);
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == weapons)
{
ShowPlayerDialog(playerid, 78657567, DIALOG_STYLE_LIST, "Choose a weapon", "Deagle\nMP5\nM4\nShotgun", "Buy", "Cancel");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 78657567)
{
if(response)
{
if(GetPlayerMoney(playerid) >= 10000)
{
if(listitem == 0)
{
GivePlayerWeapon(playerid, 24, 9999);
}
if(listitem == 1)
{
GivePlayerWeapon(playerid, 29, 9999);
}
if(listitem == 2)
{
GivePlayerWeapon(playerid, 32, 9999);
return 1;
}
if(listitem == 3)
{
GivePlayerWeapon(playerid, 25, 9999);
return 1;
}
}
}
}
return 1;
}