help .. onplayerentervehicle problem
#1

hello i want that when a player enters in these vehicles: BOTveh1, BOTveh2, BOTveh3. as passenger "g" he will have like this

pawn Код:
if(BoughtTicket[playerid] == 0)
                    {
                    SendClientMessage(playerid, COLOR_RED,"Buy plane ticket from terminal.");
                    new Float:x, Float:y, Float:z;
                    GetPlayerPos(playerid, x, y, z);
                    SetPlayerPos(playerid, x, y, z+1);
                    }
                    else
                    {
                    SendClientMessage(playerid, COLOR_YELLOW,"[Anak's Airways]: Welcome on flight sir - Your ticket is used.");
                    SendClientMessage(playerid, COLOR_WHITE,"Please exit plane when you reach your destination.");
                    BoughtTicket[playerid] = 0;
                    }

i used this but it not work...

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
   
    new vehicle;
    vehicle = GetPlayerVehicleID(playerid);
    if(vehicle == BOTveh1 || vehicle == BOTveh2 || vehicle == BOTveh3 && ispassenger == 0)
    {
                   if(BoughtTicket[playerid] == 0)
                    {
                    SendClientMessage(playerid, COLOR_RED,"Buy plane ticket from terminal.");
                    new Float:x, Float:y, Float:z;
                    GetPlayerPos(playerid, x, y, z);
                    SetPlayerPos(playerid, x, y, z+1);
                    }
                    else
                    {
                    SendClientMessage(playerid, COLOR_YELLOW,"[Anak's Airways]: Welcome on flight sir - Your ticket is used.");
                    SendClientMessage(playerid, COLOR_WHITE,"Please exit plane when you reach your destination.");
                    BoughtTicket[playerid] = 0;
                    }
    }
}
anyone can help..
Reply


Messages In This Thread
help .. onplayerentervehicle problem - by Anak - 20.03.2013, 05:19
Re: help .. onplayerentervehicle problem - by Anak - 20.03.2013, 05:22
Re: help .. onplayerentervehicle problem - by Gamer_007 - 20.03.2013, 05:26
Re: help .. onplayerentervehicle problem - by shady001 - 20.03.2013, 05:27
Re: help .. onplayerentervehicle problem - by Anak - 20.03.2013, 06:45

Forum Jump:


Users browsing this thread: 3 Guest(s)