23.02.2013, 16:27
Hello, i was trying to come up with a way to add a Item onto a car with /addlights
Say i was trying to add two big spotlights on a Huntley = Vehicle id (579)
How would i do this? i cant get my brain around it.
So far i have come up with:
I want only the command to work in the specific car = Huntley
Im new to scripting, Any help will be greatly appreciated (The Objects & Coords Aint The real objects or Coords)
Say i was trying to add two big spotlights on a Huntley = Vehicle id (579)
How would i do this? i cant get my brain around it.
So far i have come up with:
Quote:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/addlights", cmdtext, true, 10) == 0) { GetPlayerVehicleID(playerid); if(IsPlayerInVehicle(playerid, 579)) { SetPVarInt(playerid, "Status", 1); SetPVarInt(playerid, "item1", CreateObject(2099,0,0,0,0,0,0)); SetPVarInt(playerid, "item2", CreateObject(2111,0,0,0,0,0,0)); AttachObjectToVehicle(GetPVarInt(playerid, "item1"), GetPlayerVehicleID(playerid),-0.000000, 2.345006, -0.279999, 0.000000, 0.000000, 0.000000); AttachObjectToVehicle(GetPVarInt(playerid, "item2"), GetPlayerVehicleID(playerid), 0.000000, 0.219999, 0.000000, 0.000000, 0.000000, 0.000000); } } |
Im new to scripting, Any help will be greatly appreciated (The Objects & Coords Aint The real objects or Coords)