natives.changeCarColour: Difference between revisions

no edit summary
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
|games = iv
|games = iv
|type = function
|type = function
|name = natives.setDisplayPlayerNameAndIcon
|name = natives.changeCarColour
|parameters = int playerId, bool enable
|parameters = Vehicle vehicle, int colour1, int colour2
|parameter1 = int playerId The player index to affect
|parameter1 = Vehicle vehicle The vehicle
|parameter2 = bool enable True to show the name and icon, false to hide
|parameter2 = int colour1 The primary colour index
|usage = Display or hide the player’s name and icon above their ped
|parameter3 = int colour2 The secondary colour index
|notes = Intended to be used when a player streams in; playerId must be a valid client index
|usage = Change the primary and secondary colours of a vehicle
|return1 = void
|return1 = void
|exampleJS = addEventHandler("OnElementStreamIn", function(event, element) {
|exampleJS = addCommandHandler("paintcar", function(command, params, client) {
     natives.givePedFakeNetworkName(element, "Officer_John", 255, 255, 255, 255);
     natives.changeCarColour(localPlayer.vehicle, 5, 10);
});
});
}}
}}
64

edits