some plates quistions
#1

hey guys....

i wanted to ask you, how to set all my server cars plates to 'Grab'. I'm using AddStaticVehicleEx on gamemode init and i want all their plates to be 'grab' how?
Reply
#2

Questions *


https://sampwiki.blast.hk/wiki/SetVehicleNumberPlate

Look at the params and you will see how to do it.
Reply
#3

OnGameModeInit:

pawn Код:
for(new i=1; i<MAX_VEHICLES; i++)
{
    SetVehicleNumberPlate(i, "Grab");
}
Reply
#4

pawn Код:
for(new i; i < MAX_VEHICLES; i++)
{
SetVehicleNumberPlate(i, "Grab");
}
Add that under your GameModeInit
Reply
#5

You would also need to check if the vehicle id is not a model of a plane etc
Reply
#6

Quote:
Originally Posted by Neil.
Посмотреть сообщение
OnGameModeInit:

pawn Код:
for(new i=1; i<MAX_VEHICLES; i++)
{
    SetVehicleNumberPlate(i, "Grab");
}
Let's say this is the code what to do
pawn Код:
public OnGameModeInit()
{
    AddStaticVehicleEx(598,2239.4214,2451.4053,3.0180,89.9060,1,79,-1); // LVPD Car8
    AddStaticVehicleEx(598,2239.2754,2456.5281,3.0201,90.0078,1,79,-1); // LVPD Car9
    AddStaticVehicleEx(598,2239.2703,2460.8594,3.0189,89.1214,1,79,-1); // LVPD Car10
    AddStaticVehicleEx(598,2272.7065,2473.4277,3.0149,182.4931,1,79,-1); // LVPD Car11
    AddStaticVehicleEx(598,2315.1316,2499.6221,-7.7046,272.3796,1,79,-1); // LVPD Car12
    AddStaticVehicleEx(598,2315.6660,2465.8625,-7.7074,92.1054,1,79,-1); // LVPD Car13
    AddStaticVehicleEx(598,2315.4070,2460.4763,-7.7068,94.6336,1,79,-1); // LVPD Car14
    AddStaticVehicleEx(598,2296.8921,2455.8774,-7.7065,91.3159,1,79,-1); // LVPD Car15
    AddStaticVehicleEx(598,2297.4634,2460.3396,-7.7081,93.1556,1,79,-1); // LVPD Car16
    return 1;
}
Reply
#7

pawn Код:
public OnGameModeInit()
{
    AddStaticVehicleEx(598,2239.4214,2451.4053,3.0180,89.9060,1,79,-1); // LVPD Car8
    AddStaticVehicleEx(598,2239.2754,2456.5281,3.0201,90.0078,1,79,-1); // LVPD Car9
    AddStaticVehicleEx(598,2239.2703,2460.8594,3.0189,89.1214,1,79,-1); // LVPD Car10
    AddStaticVehicleEx(598,2272.7065,2473.4277,3.0149,182.4931,1,79,-1); // LVPD Car11
    AddStaticVehicleEx(598,2315.1316,2499.6221,-7.7046,272.3796,1,79,-1); // LVPD Car12
    AddStaticVehicleEx(598,2315.6660,2465.8625,-7.7074,92.1054,1,79,-1); // LVPD Car13
    AddStaticVehicleEx(598,2315.4070,2460.4763,-7.7068,94.6336,1,79,-1); // LVPD Car14
    AddStaticVehicleEx(598,2296.8921,2455.8774,-7.7065,91.3159,1,79,-1); // LVPD Car15
    AddStaticVehicleEx(598,2297.4634,2460.3396,-7.7081,93.1556,1,79,-1); // LVPD Car16
for(new i = 0; i < MAX_VEHICLES; i++) SetVehicleNumberPlate(i, "Grab");
 
  return 1;
}
Reply
#8

:facepalm:

Just put in the code he gave, also put in some checks to make sure the vehicleid isn't a plane or a bike (if you have planes and bikes in your server)
Reply
#9

ThX guys. it worked
+REP for each one helped
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)