From SA-MP Wiki

Jump to: navigation, search

DisableRemoteVehicleCollisions was added in SA-MP 0.3.7 This function was added in SA-MP 0.3.7 and will not work in earlier versions!


Allows you to disable collisions between vehicles for a player.

(playerid, disable)
playeridThe ID of the player for whom you want to disable collisions.
disableWhether you want to enable or disable collisions. 1 to disable, 0 to enable.

Return Values:

  • 1: The function executed successfully.
  • 0: The function failed to execute. This means the player specified does not exist.

Example Usage:

public OnPlayerCommandText(playerid, cmdtext[])
    if(!strcmp(cmdtext, "/collision", true))
    	new string[64];
    	format(string, sizeof(string), "Vehicle collision for you is now '%s'", (GetPVarInt(playerid, "vehCollision") != 1) ? ("Disabled") : ("Enabled"));
    	SendClientMessage(playerid, 0xFFFFFFFF, string);
    	SetPVarInt(playerid, "vehCollision", !GetPVarInt(playerid, "vehCollision"));
    	DisableRemoteVehicleCollisions(playerid, GetPVarInt(playerid, "vehCollision"));
    	return 1;
    return 0;
Personal tools