05.11.2009, 20:57
is there a way to let all the cars ingame explode?
public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext, "/exploseallcars", true) == 0) { for(new vehicleid; vehicleid < MAX_VEHICLES; vehicleid++) { SetVehicleHealth(vehicleid,1000.0); } return 1; } return 0; }
Originally Posted by Alice[A11
]
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext, "/exploseallcars", true) == 0) { for(new vehicleid; vehicleid < MAX_VEHICLES; vehicleid++) { SetVehicleHealth(vehicleid,1000.0); } return 1; } return 0; } Btw next time use the search button, things like these aren't hard to script. |
public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext, "/explodeallcars", true) == 0) { for(new vehicleid; vehicleid < MAX_VEHICLES; vehicleid++) { SetVehicleHealth(vehicleid,0.0); } return 1; } return 0; }
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/explodeallcars", true) == 0)
{
for(new vehicleid; vehicleid < MAX_VEHICLES; vehicleid++)
{
SetVehicleHealth(vehicleid,0.0);
}
return 1;
}
return 0;
}
Originally Posted by Zeromanster
pawn Код:
|
public OnPlayerCommandText(playerid,cmdtext[])
{
if(strcmp(cmdtext,"/exallcars", true) == 0)
{
new Float:p[3];
for(new v; v<MAX_VEHICLES; v++)
{
GetVehiclePos(v,p[0],p[1],p[2]);
CreateExplosion(p[0],p[1],p[2],12,3);
DestroyVehicle(v);
}
return true;
}
return false;
}