Message When trying to enter locked vehicle
#5

Quote:
Originally Posted by Devilxz97
Посмотреть сообщение
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);
            SendClientMessage(playerid, -1, "Vehicle Lock!");
        }
        return 1;
    }
   
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)
    {
        SendClientMessage(playerid, -1, "This Vehicle is Locked");
    }
    return 1;
}
hmm
please start reading topics

Quote:

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

Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)