19.08.2010, 17:56
(
Last edited by markjaysonpinoy; 19/08/2010 at 05:57 PM.
Reason: Suppose to put [PAWN] :D
)
pawn Code:
#include <a_samp>
public OnPlayerCommandText(playerid,cmdtext[])
{
if(!strcmp(cmdtext, "/wepshop", true))
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Weapon Shop","Brass Knuckles ($500)\r\nGolf Club ($500)\r\nNite Stick ($500)\r\n9mm Pistol ($1000)\r\nMP5 ($1000)\r\nSniper Rifle ($2000)\r\nRocket Launcher ($20000)\r\n","Buy!", "Exit");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1)
{
if(response)
{
if(listitem == 1)
{
GivePlayerWeapon(playerid,330,1);
GivePlayerMoney(playerid,-500);
}
if(listitem == 2)
{
GivePlayerWeapon(playerid,333,1);
GivePlayerMoney(playerid,-500);
}
if(listitem == 3)
{
GivePlayerWeapon(playerid,334,1);
GivePlayerMoney(playerid,-500);
}
if(listitem == 4)
{
GivePlayerWeapon(playerid,346,500);
GivePlayerMoney(playerid,-1000);
}
if(listitem == 5)
{
GivePlayerWeapon(playerid,353,500);
GivePlayerMoney(playerid,-1000);
}
if(listitem == 6)
{
GivePlayerWeapon(playerid,358,500);
GivePlayerMoney(playerid,-2000);
}
if(listitem == 7)
{
GivePlayerWeapon(playerid,359,10);
GivePlayerMoney(playerid,-20000);
}
}
return 1;
}
return 0;
}