Restrict drive-by?
#4

You can reset the weapons of the player if he's a driver, and set the weapons back when he gets out of the vehicle.

Example (GivePlayerWeapons(playerid) is a custom function you would need to write):
pawn Код:
new bool:RestrictedDriveBy[MAX_PLAYERS]; // On topof script

public OnPlayerEnterVehicle(playerid, vehicleid) {
    // Check if the player is the driver
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) {
        ResetPlayerWeapons(playerid); // Reset his weapons
        RestrictedDriveBy[playerid] = true;
    }
}
public OnPlayerExitVehicle(playerid, vehicleid) {
    if(RestrictedDriveBy[playerid] == true) {
        GivePlayerWeapons(playerid); // Give him back his weapons (custom)
        RestrictedDriveBy[playerid] = false;
    }
}
Reply


Messages In This Thread
Restrict drive-by? - by Arrows73 - 02.01.2012, 14:11
Re: Restrict drive-by? - by Basssiiie - 02.01.2012, 14:27
Re: Restrict drive-by? - by silvan - 02.01.2012, 14:51
Re: Restrict drive-by? - by Sinner - 02.01.2012, 14:52
Re: Restrict drive-by? - by silvan - 02.01.2012, 14:57
AW: Restrict drive-by? - by Arrows73 - 03.01.2012, 17:08

Forum Jump:


Users browsing this thread: 3 Guest(s)