Destroy cars after they spawned
#7

The var just can be used only one time, You're redefining each time. For new cars just make new vars.

Ex:

pawn Code:
new lol[10];


CMD:eveh(playerid, params[])
{
    new vehid;
    if(sscanf(params, "i", vehid)) return SendClientMessage(playerid, Red, Use: /eveh <car id>");
    new Float:x, Float:y, Float:z;new Float:angle;
    GetPlayerFacingAngle(playerid,angle);
    GetPlayerPos(playerid, x, y, z);
    lol[0] = CreateVehicle(vehid, x + 5, y +2, z, angle-180, 1,1, 60000);
    lol[1] = CreateVehicle(vehid, x + 5, y +2, z, angle-180, 1,1, 60000);
    lol[2] = CreateVehicle(vehid, x + 5, y +2, z, angle-180, 1,1, 60000);
    lol[3] = CreateVehicle(vehid, x + 5, y +2, z, angle-180, 1,1, 60000);
    lol[4] = CreateVehicle(vehid, x + 5, y +2, z, angle-180, 1,1, 60000);
    lol[5] = CreateVehicle(vehid, x + 5, y +2, z, angle-180, 1,1, 60000);    
    lol[6] = CreateVehicle(vehid, x + 5, y +2, z, angle-180, 1,1, 60000);
    lol[7] = CreateVehicle(vehid, x + 5, y +2, z, angle-180, 1,1, 60000);
    lol[8] = CreateVehicle(vehid, x + 5, y +2, z, angle-180, 1,1, 60000);    
    lol[9] = CreateVehicle(vehid, x + 5, y +2, z, angle-180, 1,1, 60000);  
    return 1;
}
CMD:destroyveh(playerid, params[])
{  
   DestroyVehicle(lol); // it will destroy all lol.
   return 1;
}
Reply


Messages In This Thread
Destroy cars after they spawned - by MarinacMrcina - 04.06.2012, 20:34
Re: Destroy cars after they spawned - by milanosie - 04.06.2012, 20:34
Re: Destroy cars after they spawned - by MarinacMrcina - 04.06.2012, 20:37
Re: Destroy cars after they spawned - by leonardo1434 - 04.06.2012, 20:45
Re: Destroy cars after they spawned - by MarinacMrcina - 04.06.2012, 21:02
Re: Destroy cars after they spawned - by milanosie - 04.06.2012, 21:10
Re: Destroy cars after they spawned - by leonardo1434 - 04.06.2012, 21:16
Re: Destroy cars after they spawned - by FalconX - 04.06.2012, 21:26
Re: Destroy cars after they spawned - by leonardo1434 - 04.06.2012, 21:37
Re: Destroy cars after they spawned - by milanosie - 04.06.2012, 21:39

Forum Jump:


Users browsing this thread: 1 Guest(s)