How I can add next car to this command?
#1

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.
Reply


Messages In This Thread
How I can add next car to this command? - by Riwerry - 05.11.2013, 05:11

Forum Jump:


Users browsing this thread: 1 Guest(s)