OnPlayerEnterVehicle to StateChange
#1

Could someone edit my OnPLayerEnterVehicle
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    for(new i = 0; i < 12; i++)
    {
        new pFac = PlayerInfo[playerid][pMember];
        if(vehicleid == LSPDVehicles[i])
        {
            if(pFac != 1)
            {
                ClearAnimations(playerid);
                SendClientMessage(playerid, -1, "You don`t have the keys for this car.");
            }
        }
    }
    return 1;
}
And make it not let them inside if they try to drive it, but passengers allowed..

Make into ONPlayerStateChange
Reply
#2

+REP for helper
Reply
#3

pawn Код:
if(newstate == PLAYER_STATE_DRIVER && oldstate == PLAYER_STATE_ONFOOT)
    {
            new vehicleid = GetPlayerVehicleID(playerid);
        for(new i = 0; i < 12; i++)
        {
            new pFac = PlayerInfo[playerid][pMember];
            if(vehicleid == LSPDVehicles[i])
            {
                if(pFac != 1)
                {
                    ClearAnimations(playerid);
                    SendClientMessage(playerid, -1, "You don`t have the keys for this car.");
                }
            }
        }
    }
Reply
#4

Millenium.pwn(427) : error 017: undefined symbol "vehicleid"
Reply
#5

Ops, sorry. I edited my original post.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)