vehicles.Add
From GMod Wiki
Function | |
Syntax |
vehicles.Add( String vehicle_name, String menu_name, String menu_icon_mat ) Where is this used? |
Description: | |
Adds a vehicle to the client's vehicles table. | |
Returns: | nil |
Part of Library: | Vehicles |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Vehicles.Add]Vehicles.Add [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Example
Description | Server sends a command to client to add a new vehicle to its vehicle list. Client would then call vehicles.RefreshList. |
---|---|
Used on | |
Code | player:SendLua("vehicles.Add( " .. vname .. ", " .. name .. ", " .. icon .. " );"); |
Output | N/A |
Additional Notes
- This function is meant to be sent to the client from the server -- though there's nothing keeping you from calling it directly on the client, it wouldn't make sense unless the update actually represents a change on the server as well.