All Vehicles Spawner Menu
#3

ok, my code:

Quote:

enum VEHICLEDATA(){
Text3D:v3dtext,
id
}

new Veh[150][VEHICLEDATA];

stock CreateVehFromList(listitem, playerid)
{
new Float: x, Float: y, Float:z;
GetPlayerPos(playerid, x, y, z);

new vid = CreateVehicle(listitem+400,x+1.2,y+1.2,z,0,-1,-1,600000);

LinkVehicleToInterior(vid,GetPlayerInterior(player id));

new text[64];
format(text,sizeof(text),"[%d] %s spawned !", listitem+400,VehicleName[listitem]);
SendClientMessage(playerid, COLOR_MAGENTA, text);

Veh[vid][id] = vid;
new str[256];
format(str, sizeof(str), "[VEHICLE] \nModel: %i \nVehicleID: %i", GetVehicleModel(vid),Veh[vid][id]);
Veh[vid][v3dtext] = Create3DTextLabel(str,0xFF0000FF,0.0,0.0,0.0,50.0,-1,1);
Attach3DTextLabelToVehicle(Veh[vid][v3dtext],vid,0.0,0.0,0.5);
}

can u say me if is it good?


but for remove all cars created or remove by id no work:

Quote:

stock RemoveVeh(inputtext[])
{
new playerid;

if (strval(inputtext) != 0 )
{
DestroyVehicle(strval(inputtext));
}
else
{
for(new i = 0; i < 150; i++)
{
DestroyVehicle(i);
}
}
}

in InputText you type 0 if u want delete all or an id...
thanks..
Reply


Messages In This Thread
All Vehicles Spawner Menu - by maxrobon1_police - 03.05.2012, 12:34
Re: All Vehicles Spawner Menu - by Jonny5 - 03.05.2012, 12:49
Re: All Vehicles Spawner Menu - by maxrobon1_police - 03.05.2012, 19:30

Forum Jump:


Users browsing this thread: 1 Guest(s)