A weird bug?!
#5

Quote:
Originally Posted by streetpeace
Посмотреть сообщение
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new Float:Pos[3];
    if(!ispassenger)
    {
         if(IsPoliceVeh(vehicleid))
         {
             SendClientMessage(playerid, -1, "Vous n'кtes pas membre de la police!");
             GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
             SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
         }
         if(IsCamionneurVeh(vehicleid))
         {
             SendClientMessage(playerid, -1, "Vous n'кtes pas camionneur ou vous n'avez pas les compйtences nйcessaires ou vous n'кtes pas en service.");
             GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
             SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
         }
         else if(IsAmbulancierVeh(vehicleid))
         {
             SendClientMessage(playerid, -1, "Vous n'кtes pas ambulancier.");
             GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
             SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
             printf("Ambulance");
         }
    }
    return 1;
}
The two else if doesn't work.
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new Float:Pos[3];
    if(!ispassenger)
    {
         if(IsPoliceVeh(vehicleid))
         {
             SendClientMessage(playerid, -1, "Vous n'кtes pas membre de la police!");
             GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
             SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
         }
         else if(IsCamionneurVeh(vehicleid)) // This needs to be like this
         {
             SendClientMessage(playerid, -1, "Vous n'кtes pas camionneur ou vous n'avez pas les compйtences nйcessaires ou vous n'кtes pas en service.");
             GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
             SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
         }
         else if(IsAmbulancierVeh(vehicleid))
         {
             SendClientMessage(playerid, -1, "Vous n'кtes pas ambulancier.");
             GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
             SetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
             printf("Ambulance");
         }
    }
    return 1;
}
Also you maybe have a problem in your functions. Maybe they return 0 which makes the script ignore the statement.

Show us the functions. All 3 of them.
Reply


Messages In This Thread
A weird bug?! - by streetpeace - 27.11.2014, 11:03
Re: A weird bug?! - by DaniceMcHarley - 27.11.2014, 11:05
Re : A weird bug?! - by streetpeace - 27.11.2014, 12:38
Re: A weird bug?! - by CalvinC - 27.11.2014, 12:59
Re: Re : A weird bug?! - by Runn3R - 27.11.2014, 13:46
Re : A weird bug?! - by streetpeace - 27.11.2014, 15:32
Re: A weird bug?! - by Abagail - 27.11.2014, 15:34
Re : A weird bug?! - by streetpeace - 27.11.2014, 15:38
Re : A weird bug?! - by streetpeace - 27.11.2014, 18:39
Re: Re : A weird bug?! - by Runn3R - 27.11.2014, 21:02

Forum Jump:


Users browsing this thread: 1 Guest(s)