04.11.2013, 22:49
Yeah mate, thanks a lot! And my last question, when i want to create more vehicles, what will be using these police lights, BUT on same COMMAND (/policelights), for example i actually have Bullet maked correctly and how i need to script the second vehicle? For example Sultan? I just don't know how to add second vehicle to this same command.
Please, help me with that
pawn Код:
//Current command
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);
SendClientMessage(playerid, 0xFFFFFF, "You turned on police light on your car!");
}
else
if(IsPlayerInVehicle(playerid, STU1))
if(IsValidObject(VehicleObject[0]))
{
DestroyObject(VehicleObject[0]);
SendClientMessage(playerid, 0xFFFFFF, "You turned off police light on your car!");
}
return 1;
}
