Question about respawning cars - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Question about respawning cars (
/showthread.php?tid=261392)
Question about respawning cars -
Ehab1911 - 13.06.2011
Hey guys, Can you help me with making a command that respawns all the server's cars?
like /respawnallcars -> It will respawn everycar
AND: I want something that makes the vehicles respawn whenever I restart the server, please
Re: Question about respawning cars -
Gazmull - 13.06.2011
Try searching
maybe this works for you
https://sampforum.blast.hk/showthread.php?tid=179200
Re: Question about respawning cars -
Skaizo - 13.06.2011
Код:
if(strcmp(cmdtext,"/respawncars",true) == 0)
{
new name[MAX_PLAYER_NAME],string[32];
GetPlayerName(playerid,name,sizeof(name));
format(string,sizeof(string),"The player \"%s\" has set the vehicles to respawn.",name);
SendClientMessageToAll(COLOR,string);
for(new i = 0; i < MAX_VEHICLES; i++)
{
if(IsPlayerInVehicle(i,i))
{
RemovePlayerFromVehicle(i);
}
SetVehicleToRespawn(i);
}
return 1;
}
Respuesta: Question about respawning cars -
RatHack - 13.06.2011
Quote:
Originally Posted by Ehab1911
AND: I want something that makes the vehicles respawn whenever I restart the server, please
|
https://sampwiki.blast.hk/wiki/AddStaticVehicleEx
Re: Question about respawning cars -
Ehab1911 - 14.06.2011
Thanks a lot guys!! It helped me so much! Thanks, Appreciating this!!
Re: Question about respawning cars - ColdIce - 14.06.2011
or if u want dcmd
pawn Код:
dcmd_respawncars(playerid,params[])
{
#pragma unused params
if(AccInfo[playerid][Level] >= 1 || IsPlayerAdmin(playerid))
{
SendClientMessage(playerid, green, "|- Your have Successfully Respawned all Vehicles! -|");
GameTextForAll("~n~~n~~n~~n~~n~~n~~r~Vehicles ~g~Respawned!", 3000,3);
for(new cars=0; cars<MAX_VEHICLES; cars++)
{
if(!VehicleOccupied(cars))
{
SetVehicleToRespawn(cars);
}
}
return 1;
}
else return ErrorMessages(playerid, 1);
}