16.01.2010, 19:53
Quote:
|
Originally Posted by GTAguillaume
Change SpawnedVehicles to the variable where you save your spawned vehicles
Код:
stock RespawnAllVehicles()
{
for(new X; X <= sizeof(SpawnedVehicles); X++) if(SpawnedVehicles[X] != 0) DestroyVehicle(SpawnedVehicles[X]);
for(new v = 1; v <= MAX_VEHICLES; v++) SetVehicleToRespawn(v);
}
Код:
new SpawnedVehicles[200]; //change 200 to the max spawned vehicles Код:
if (!strcmp("/turismo", cmd, true)) //change /turismo to the command
{
for(new i;i<sizeof(SpawnedVehicles);i++)
{
if(SpawnedVehicles[i] == 0)
{
new Float:X,Float:Y,Float:Z,Float:ROT;
GetPlayerPos(playerid,X,Y,Z);
GetPlayerAngle(playerid,ROT
SpawnedVehicles[i] = CreateVehicle(MODEL,X,Y,Z,ROT,COLOR1,COLOR2); //change MODEL,COLOR1 and COLOR2
return 1;
}
return 1
}
|

