Car lock help
#1

I scripted a training server for my clan. A nice one too. But at clan wars on cod5 ressurection we need to fight on foot. In my clan server I have many airal vehicles. I need a command to lock all hunters,sparrows,rustlers, or remove players from them when they get in, so my clan will learn to fight on foot more. I also need a command to unlock them.

I have never tried using lock functions and would have no idea how to do this. Any help would be apreciated.
Reply
#2

pawn Код:
dcmd_lockcar(playerid,params[]) {
    #pragma unused params
    if(PlayerInfo[playerid][Level] >= 2) {
        if(IsPlayerInAnyVehicle(playerid)) {
            for(new i = 0; i < MAX_PLAYERS; i++) SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid),i,false,true);
            CMDMessageToAdmins(playerid,"LOCKCAR");
            PlayerInfo[playerid][DoorsLocked] = 1;
            new string[128]; format(string,sizeof(string),"Administrator \"%s\" has locked his car", pName(playerid));
            return SendClientMessageToAll(blue,string);
        } else return SendClientMessage(playerid,red,"ERROR: You need to be in a vehicle to lock the doors");
    } else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
}
Reply
#3

Thanks. but not exactly what im looking for. Thats a command for admins to lock their cars. I need a command to lock and unlock all hydras, hunters, sparrows, and rustlers.
Reply
#4

this will help you
https://sampwiki.blast.hk/wiki/SetVehicleParamsForPlayer
if i helped you do this:
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)