[FilterScript] [FS]Club Jizzy pickup Drink BEER,Wine,Sprunk,Smoke(DIALOG)
#1

ScreenShots
When you rise on a pickup the dialog window is highlighted
In it dialog a window it is possible to drink beer, wine, sprunk, and to smoke
Sorry my bad ENGLISH =)
Please Comment


Code:
#include <a_samp>
#define FILTERSCRIPT
new zhrat;

forward OnFilterScpiptExit();
public OnFilterScriptInit()
{
zhrat = CreatePickup(1274,1,-2652.3225,1410.6608,906.2734);
return 1;
}

public OnFilterScpiptExit()
{

return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == zhrat)
{
new Float:X,Float:Y,Float:Z;
PlayerPlaySound(playerid, 1150, X, Y, Z);
ShowPlayerDialog(playerid,156,DIALOG_STYLE_LIST,"ClubJizzy","Drink Beer(1$)\nDrink Wine(2$)\nDrink Sprunk(3$)\nSmoke(5$)","Buy","Cancel");
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 156)
{
if(response)
{
if(listitem == 0) 
{
if(GetPlayerMoney(playerid) < 1)
return SendClientMessage(playerid, 0xFFFFFF, "You have not enough money");
GivePlayerMoney(playerid, -1);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
    }
if(listitem == 1)
{
if(GetPlayerMoney(playerid) < 2)
return SendClientMessage(playerid, 0xFFFFFF, "You have not enough money");
GivePlayerMoney(playerid, -2);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);

}
if(listitem == 2)
{
if(GetPlayerMoney(playerid) < 3)
return SendClientMessage(playerid, 0xFFFFFF, "You have not enough money.");
GivePlayerMoney(playerid, -3);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
}
if(listitem == 3)
{
if(GetPlayerMoney(playerid) < 5)
return SendClientMessage(playerid, 0xFFFFFF, "You have not enough money");
GivePlayerMoney(playerid, -3);
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_SMOKE_CIGGY);
}
}
return 1;
}
return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)