Tollgates
#3

pawn Код:
#define toll "100"
// change your toll price

CMD:opentoll(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 100, 2695.6880, -1704.6300, 11.8438))
    {                               // (playerid, Float:range, Float:x, Float:y, Float:z), an example
        if(GetPlayerMoney(playerid) < toll) return SendClientMessage(playerid, 0xFF0000FF, "You do not have enough money to buy a ticket for toll gate!");
        DestroyObject(100); //object ID, that was just an example
        GivePlayerMoney(playerid, - toll);
        SendClientMessage(playerid, 0xFF0000FF, "TOLLGIRL: Thank you for using San Andreas Toll! Have a nice drive!");
    }
    else
    {
        CreateObject(2587, 2001.195679, 1547.113892, 14.283400, 0.0, 0.0, 96.0); //(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance), an example
    }
    return 1;
}
Reply


Messages In This Thread
Tollgates - by ExtremeReality - 03.04.2014, 21:18
Re: Tollgates - by benjaminjones - 03.04.2014, 21:26
Re: Tollgates - by Extraordinariness - 04.04.2014, 01:05
Re: Tollgates - by Extraordinariness - 04.04.2014, 05:30

Forum Jump:


Users browsing this thread: 1 Guest(s)