04.06.2012, 21:16
The var just can be used only one time, You're redefining each time. For new cars just make new vars.
Ex:
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;
}