help please
#1

Hey guys. Got some problems again...

pawn Код:
if(postjob[playerid] == 1)
    {
    if(GetPlayerVehicleID(playerid == bmx1||bmx2||bmx3))
    {
    SetPlayerCheckpoint(playerid,2522.4753,-1679.4388,15.4970,3);
    GivePlayerMoney(playerid,25);
    postjob[playerid] = 2;
    return 1;
    }
    else
    {
    SendClientMessage(playerid, COLOR_DARKORANGE, "You have to be on your BMX");
    return 1;
    }
    }
This is at OnPlayerEnterCheckpoint

It even gives me the message that I have to be on my BMX when I am on one of the 3 bmx

This is where I make them:
pawn Код:
bmx1 = AddStaticVehicleEx ( 481,1979.3250,-1280.7943,23.8203,0.8249,56,56, 15 );
    bmx2 = AddStaticVehicleEx ( 481,1981.6943,-1280.7902,23.8203,359.8849,56,56, 15 );
    bmx3 = AddStaticVehicleEx ( 481,1985.1635,-1280.8546,23.9843,359.8849,56,56, 15 );

Strange enough this works fine:
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;
    }
    }
    return 1;
}

please help
Reply
#2

pawn Код:
if(GetPlayerVehicleID(playerid == bmx1||bmx2||bmx3))
Doesn't work.
pawn Код:
new
    vid = GetPlayerVehicleID(playerid);

if(vid == bmx1 || vid == bmx2 || vid == bmx3)
{
    // your code
}
Reply
#3

Works fine now, Thankyou
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)