This command isn't working in a copcar. But it should.
#4

Have you tried debugging it?

Instead of having lots of checks on one line, spread them out and find the problem.

EG:

pawn Код:
if(PlayerInfo[playerid][pMember] == FACT_COPS_LS)
{
    if(!PlayerToPoint(5, playerid,1550.79,-1663.25,-9.19))
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            if(IsACopCar(GetPlayerVehicleID(playerid)))
            {
            }
            else
            {
                printf("<error> Player is not in a cop car");
            {
        }
        else
        {
            print("<error> Player is not in a vehicle");
        }
    }
    else
    {
        print("<error> Player is in range of 1550.79,-1663.25,-9.19");
    }
}
else
{
    printf("<error> Var PlayerInfo[playerid][pMember] == %d", PlayerInfo[playerid][pMember]);
}
It is more code but a million times easier to debug than all in one line. This is just an example you may want that to be structured differently.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)