SA-MP Forums Archive
Destory spawned vehicles - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Destory spawned vehicles (/showthread.php?tid=359377)



Destory spawned vehicles - Starky Yakavetta - 13.07.2012

Can somebody make mi command for destroying all spawned veh with the command /veh


Re: Destory spawned vehicles - Warfish - 13.07.2012

Learn basic scripting first.. the next thing you are going to ask us is to make you a whole server?


Re: Destory spawned vehicles - Accord - 13.07.2012

In your mode:
PHP код:
new bool:AdminVS[MAX_VEHICLES]; 
In the end of public OnGameModeInit:
PHP код:
for(new 0MAX_VEHICLESi++) AdminVS[i] = false
In the end of the command /veh, when it creating the vehicle:
PHP код:
AdminVS[i] = true
In the public OnPlayerCommandText:
PHP код:
if(!strcmp(cmdtext"/vdelall"true))
{
for(new 
0MAX_VEHICLESi++) if(AdminVSDestroyVehicle(vehicleid), A;
return 
SendClientMessage(playerid, -1"You have removed the all vehicles that you has been created before");




Re: Destory spawned vehicles - Starky Yakavetta - 14.07.2012

Quote:
Originally Posted by Accord
Посмотреть сообщение
In your mode:
PHP код:
new bool:AdminVS[MAX_VEHICLES]; 
In the end of public OnGameModeInit:
PHP код:
for(new 0MAX_VEHICLESi++) AdminVS[i] = false
In the end of the command /veh, when it creating the vehicle:
PHP код:
AdminVS[i] = true
In the public OnPlayerCommandText:
PHP код:
if(!strcmp(cmdtext"/vdelall"true))
{
for(new 
0MAX_VEHICLESi++) if(AdminVSDestroyVehicle(vehicleid), A;
return 
SendClientMessage(playerid, -1"You have removed the all vehicles that you has been created before");


tnx for the command


Re: Destory spawned vehicles - clarencecuzz - 14.07.2012

pawn Код:
if(!strcmp(cmdtext, "/vdelall", true))
{
for(new i = 0; i < MAX_VEHICLES; i++) if(AdminVS) DestroyVehicle(i), A;
return SendClientMessage(playerid, -1, "You have removed the all vehicles that you has been created before");
}