Message When trying to enter locked vehicle
#1

Title explains everything,

I have this

pawn Код:
if(!strcmp(cmdtext,"/lock",true))
    {
        if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xFFFFFFAA,"You have to be inside a vehicle.");
        for(new i=0; i < MAX_PLAYERS; i++)
        {
            //if(i == playerid) continue;
            SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i,0,1);
        }
        return 1;
    }
and I tried it with

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new engine, lights, alarm, doors, bonnet, boot, objective;
    GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
    if(doors == 1)
    {
        new Text:txt;
        txt = TextDrawCreate(10.0, 250.0, "This Vehicle is Locked");
        TextDrawUseBox(txt, 1);
        TextDrawBoxColor(txt, 0x00000055);
        TextDrawTextSize(txt, 125, 5);
        TextDrawShowForPlayer(playerid, txt);
    }
    return 1;
}
but it's not working since it's "OnEnterVehicle", unfortunatelly vehicle is locked so player can't enter it, so I need something when he tries to enter vehicle + is there any way to play that animation like player is trying to open doors but they are locked when doors are locked? I mean like when in singleplayer you try to get police car..
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)