Number plate help
#1

1. Ive searched after fixes but cant find any

Hello, Ive created a command that gives the car a new plate on gamemode start but when that car respawn or breake after that it has a normal plate and not the special plate it has.

please help me.


Код:
 cid = AddStaticVehicle(modelid,spawnX,spawnY,spawnZ,spawnA,Color1,Color2);
    SetVehicleNumberPlate(cid,plate);
    SetVehicleToRespawn(cid);
The code i got to change plate in the addcar script ive made
Reply
#2

Vehicles don't respawn unless a player has been in them
Reply
#3

Quote:
Originally Posted by Rav
Vehicles don't respawn unless a player has been in them
-.-'' that wsnt event a help i need help how the cars shall keep the plate when they get destroyed -.-''
Reply
#4

search for this one, tip:OnVehicleSpawn.
Reply
#5

Quote:
Originally Posted by Rks_
search for this one, tip:OnVehicleSpawn.
ty worked but now i got an porblem more =(


Код:
SetVehicleNumberPlate(vehicleid,cInfo[vehicleid][Plate]);
  SetVehicleToRespawn(vehicleid);
  SetVehiclePos(vehicleid,cInfo[vehicleid][SpawnX],cInfo[vehicleid][SpawnY],cInfo[vehicleid][SpawnZ]);
  SetVehicleZAngle(vehicleid,cInfo[vehicleid][SpawnR]);
it does the Setpos 1 and then respawn it so it wont go to the pos it shull go to =(
Reply
#6

Quote:
Originally Posted by | Friped |
Quote:
Originally Posted by Rks_
search for this one, tip:OnVehicleSpawn.
ty worked but now i got an porblem more =(


Код:
SetVehicleNumberPlate(vehicleid,cInfo[vehicleid][Plate]);
  SetVehicleToRespawn(vehicleid);
  SetVehiclePos(vehicleid,cInfo[vehicleid][SpawnX],cInfo[vehicleid][SpawnY],cInfo[vehicleid][SpawnZ]);
  SetVehicleZAngle(vehicleid,cInfo[vehicleid][SpawnR]);
it does the Setpos 1 and then respawn it so it wont go to the pos it shull go to =(
You need to use that with timer under OnVehicleSpawn
Reply
#7

Quote:
Originally Posted by Dujma
Quote:
Originally Posted by | Friped |
Quote:
Originally Posted by Rks_
search for this one, tip:OnVehicleSpawn.
ty worked but now i got an porblem more =(


Код:
SetVehicleNumberPlate(vehicleid,cInfo[vehicleid][Plate]);
  SetVehicleToRespawn(vehicleid);
  SetVehiclePos(vehicleid,cInfo[vehicleid][SpawnX],cInfo[vehicleid][SpawnY],cInfo[vehicleid][SpawnZ]);
  SetVehicleZAngle(vehicleid,cInfo[vehicleid][SpawnR]);
it does the Setpos 1 and then respawn it so it wont go to the pos it shull go to =(
You need to use that with timer under OnVehicleSpawn
ok? ive tried that but didnt get it to work can you help me then?
Reply
#8

SetTimer(".", time, repeating);
Reply
#9

Use this:

pawn Код:
SetVehicleNumberPlate(vehicleid,cInfo[vehicleid][Plate]);
SetTimer("SetPlate", 1000, false);
pawn Код:
forward SetPlate(vehicleid);
public SetPlate(vehicle id)
{
  SetVehicleToRespawn(vehicleid);
  SetVehiclePos(vehicleid,cInfo[vehicleid][SpawnX],cInfo[vehicleid][SpawnY],cInfo[vehicleid][SpawnZ]);
  SetVehicleZAngle(vehicleid,cInfo[vehicleid][SpawnR]);

}
Reply
#10

Quote:
Originally Posted by _TeRmiNaToR_
Use this:

pawn Код:
SetVehicleNumberPlate(vehicleid,cInfo[vehicleid][Plate]);
SetTimer("SetPlate", 1000, false);
pawn Код:
forward SetPlate(vehicleid);
public SetPlate(vehicle id)
{
  SetVehicleToRespawn(vehicleid);
  SetVehiclePos(vehicleid,cInfo[vehicleid][SpawnX],cInfo[vehicleid][SpawnY],cInfo[vehicleid][SpawnZ]);
  SetVehicleZAngle(vehicleid,cInfo[vehicleid][SpawnR]);

}
Spawns on wrong posistion still becouse it wont even be placed at the pos
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)