Tollgates
#1

Okay so basically ive been trying to add tollgates and when I did we basically have a bug where the tollgates have like double gate object, so if you /opentoll it would open and there'd be another gate below it

When I restarted the server after scripting, it started working for 5 minutes and then someone joined ingame and it stopped working, could there be something wrong?...
Reply
#2

Show us your code mate, are we supposed to guess your codes?
Reply
#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
#4

I do not know how MoveObject works so I used DestroyObject.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)