Help please
#1

Hy guys.

I have a little problem

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(GetPlayerVehicleID(vehicleid) == bmx1||bmx2||bmx3)
    {
    if(postjob[playerid] == 0)
    {
    SendClientMessage(playerid, COLOR_DARKORANGE, "You need to start the post job /postjob");
    new Float:slx, Float:sly, Float:slz;
    GetPlayerPos(playerid, slx, sly, slz);
    SetPlayerPos(playerid, slx, sly, slz+1);
    }
    }
    return 1;
}
I want that you only can't join the 3 bmxs. but when I put this in I can't enter any car anymore.

How to fix?
Reply
#2

Change the Bmx1,2,3 just to the id of the bmx itself
Reply
#3

Just use:
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(vehicleid == bmx1||bmx2||bmx3)
    {
    if(postjob[playerid] == 0)
    {
    SendClientMessage(playerid, COLOR_DARKORANGE, "You need to start the post job /postjob");
    new Float:slx, Float:sly, Float:slz;
    GetPlayerPos(playerid, slx, sly, slz);
    SetPlayerPos(playerid, slx, sly, slz+1);
    }
    }
    return 1;
}
Reply
#4

jonni. YOur code didn't work either
Reply
#5

Someone else an idea?
Reply
#6

Maybe use a else statement for all other cars
Reply
#7

How can I do that?
Reply
#8

Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(GetPlayerVehicleID(vehicleid) == bmx1||bmx2||bmx3)
    {
    if(postjob[playerid] == 0)
    {
    SendClientMessage(playerid, COLOR_DARKORANGE, "You need to start the post job /postjob");
    new Float:slx, Float:sly, Float:slz;
    GetPlayerPos(playerid, slx, sly, slz);
    SetPlayerPos(playerid, slx, sly, slz+1);
    }
    }
    else
    {
    //put the code for normal vehicles here something like above
    }
    return 1;
}
Reply
#9

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(vehicleid == bmx1 || vehicleid == bmx2 || vehicleid == bmx3)
    {
    if(postjob[playerid] == 0)
    {
    SendClientMessage(playerid, COLOR_DARKORANGE, "You need to start the post job /postjob");
    new Float:slx, Float:sly, Float:slz;
    GetPlayerPos(playerid, slx, sly, slz);
    SetPlayerPos(playerid, slx, sly, slz+1);
    }
    }
    return 1;
}
that should work
Reply
#10

didn't work either. this is strange
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)