[FilterScript] Ticket System
#1

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
Reply
#2

Useless?
Reply
#3

How you mean "Useless"?
Reply
#4

What exactly is this needed for...?
Reply
#5

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

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)