How I can add next car to this command? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How I can add next car to this command? (
/showthread.php?tid=473894)
How I can add next car to this command? -
Riwerry - 05.11.2013
Hello guys, can please somebody help me, how can I place the new car with police light to this script?
pawn Код:
COMMAND:policelights(playerid, cmdtext[])
{
if(IsPlayerInVehicle(playerid, STU1))
if(!IsValidObject(VehicleObject[0]))
{
VehicleObject[0] = CreateObject(18646,0,0,-1000,0,0,0,100);
AttachObjectToVehicle(VehicleObject[0], STU1, 0.449999,0.674999,0.375000,0.000000,0.000000,0.000000);
}
else
if(IsValidObject(VehicleObject[0]))
if(IsPlayerInVehicle(playerid, STU1))
{
DestroyObject(VehicleObject[0]);
}
return 1;
}
For example this is first car Bullet, when i type /policelights it turns lights on, when I type this command again it turns lights off, and I want to add new car, but on this same command.