DisableRemoteVehicleCollisions
From SA-MP Wiki
Description:
Disables collisions between occupied vehicles for a player.
(playerid, disable)
playerid | The ID of the player for whom you want to disable collisions. |
disable | 1 to disable collisions, 0 to enable collisions. |
Return Values:
- 1: The function executed successfully.
- 0: The function failed to execute. 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; }