SA-MP Forums Archive
[FilterScript] Ticket System - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Ticket System (/showthread.php?tid=638303)



Ticket System - DIIGNITY - 29.07.2017

TICKET SYSTEM


Hi, today i was boring so i make the basic ticket system.

Code:
//LETENKY
//BY DIIGNITY

#include <a_samp>
#include <zcmd>


forward EndTeleport(playerid);





//---------------------------------------------

public OnFilterScriptInit()
{
    CreatePickup(1239,1,1688.8159,-2237.5386,13.5396,-1);
  	Create3DTextLabel("/buyticket",0xFF0000AA,1688.8159,-2237.5386,13.5396,30,0,0);
}

//---------------------------------------------

CMD:buyticket(playerid, params[])
{
    if (IsPlayerInRangeOfPoint(playerid, 7.0, 1688.8159,-2237.5386,13.5396))
    {
        ShowPlayerDialog(playerid, 888, DIALOG_STYLE_LIST, "Tickets", "Desert Island (500$)", "Select", "Quit"); 
    }
    else
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "You are not near place to buy the ticket!"); 
    }
    return 1;
}

//---------------------------------------------

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 888)
	{
		if(response)
		{
			if(listitem == 0)
			{
			 if(GetPlayerMoney(playerid)>=500)
			 {
                SendClientMessage(playerid, 0xFFFFFFFF, "You buy ticket to the Desert Island");
                SetPlayerPos(playerid, 1.808619,32.384357,1199.593750); 
                SetCameraBehindPlayer(playerid);
                SetTimerEx("EndTeleport", 10000, false, "i", playerid);
                GivePlayerMoney(playerid,-500);
 			}
        }
    }
    
}
	return 0;
}

//---------------------------------------------

public EndTeleport(playerid) 
{
    SetPlayerPos(playerid, -699.1899,-7450.6929,37.9266); 
    SendClientMessage(playerid, 0xFFFFFFFF, "((PLANE)) The plane landed, we wish you a nice day.");
    return 1;
}
Pastebin: https://pastebin.com/LefGnPAs



Re: Ticket System - iLearner - 29.07.2017

Useless?


Re: Ticket System - DIIGNITY - 29.07.2017

How you mean "Useless"?


Re: Ticket System - Variableā„¢ - 29.07.2017

What exactly is this needed for...?


Re: Ticket System - DIIGNITY - 29.07.2017

Buy ticket to some place, if will be some rp located in all cities in the game it will be good travel.


Re: Ticket System - Ouizzane - 30.07.2017

I appreciate your efforts but still have a card for this function, we can not say that it is a useless thing but there is a lack somewhere.