Help with Entering a bus
#1

I made this under OnPlayerEnterVehicle:
pawn Код:
new BusVeh = GetVehicleModel(vehicleid);
    new String[256];
    new PassengerName[256];
   
    if(BusVeh==437 || BusVeh==431 && GetPlayerState(playerid)==2 && gTeam[playerid]!=1337)
    {
    SendClientMessage(playerid, COLOR_RED, "You must be a bus driver to drive a bus!");
    RemovePlayerFromVehicle(playerid);
    }
    else if(BusVeh==437 || BusVeh==431 && gTeam[playerid]!=1337)
    {
    new BusDriver = GetVehicleDriver(vehicleid);
    if(OnBusDuty[BusDriver]==1)
    {
    GivePlayerMoney(playerid, -5);
    SendClientMessage(playerid, COLOR_GREEN, "You entered the bus for $5");
    GetPlayerName(playerid, PassengerName, sizeof(PassengerName));
    format(String, sizeof(String), "%s has entered your bus!", PassengerName);
    SendClientMessage(BusDriver, COLOR_GREEN, String);
    }
    else
    {
    SendClientMessage(playerid, COLOR_RED, "There is no bus driver that is on duty in this bus!");
    RemovePlayerFromVehicle(playerid);
    }
    }
    return 1;
When I enter the Bus/Coach as driver, without being gTeam 1337 ( LOL )
I won't get removed from the vehicle, Neither will i when i enter as passenger without a valid Bus Driver.
How to fix this?
Thanks, Goz3rr

BTW: I dont get any compile errors or warnings
Reply


Messages In This Thread
Help with Entering a bus - by Gozerr - 28.05.2009, 15:16
Re: Help with Entering a bus - by SpiderPork - 28.05.2009, 15:21
Re: Help with Entering a bus - by Gozerr - 28.05.2009, 15:26
Re: Help with Entering a bus - by SpiderPork - 28.05.2009, 15:28
Re: Help with Entering a bus - by Djiango - 28.05.2009, 15:35
Re: Help with Entering a bus - by lol2112 - 28.05.2009, 15:53

Forum Jump:


Users browsing this thread: 1 Guest(s)