What's wrong?!
#1

pawn Код:
forward IsATaxi(carid);

public IsATaxi(carid)
{
    if(carid >= 1 && carid <= 8)
    {
        return 1;
    }
    return 0;
}
[b] on the next part the first thing - the /engine is working and shown when player enter a vehicle but the second part isnt working.. if i'm not a taxi driver and i enter i can drive, and if i'm a taxi driver who's not on duty i still can drive..

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
        new vehicle = GetPlayerVehicleID(playerid);
        new engine, lights, alarm, doors, bonnet, boot, objective;
        GetVehicleParamsEx(vehicle,engine,lights,alarm,doors,bonnet,boot,objective);
        if(engine != 1)
        {
            SendClientMessage(playerid, COLOR_LIGHTBLUE,"To start the engine use '/engine' ");
        }
        return 1;
    }
    new newcar = GetPlayerVehicleID(playerid);
    if(newstate == PLAYER_STATE_DRIVER)
    {
        if(IsATaxi(newcar))
        {
            if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
            {
                if(OnDuty[playerid]==0)
                {
                    RemovePlayerFromVehicle(playerid);
                    SendClientMessage(playerid,COLOR_GREY,"You are not on duty!");
                }
                else if(OnDuty[playerid]==1)
                {
                    SendClientMessage(playerid,COLOR_GREEN,"Use /help for more information");
                }
            }
            else
            {
                RemovePlayerFromVehicle(playerid);
                SendClientMessage(playerid,COLOR_GREY,"You are not a Taxi Driver!");
            }
        }
    }
    return 1;
}
Reply
#2

Why you dont use the model of taxi ?
Reply
#3

Well didnt think of it.. but that's not the point..

can you tell me what's wrong in it?

in edition that I made on another script it worked perfectly..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)