[Pedido] Sistema de respawn - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Pedido] Sistema de respawn (
/showthread.php?tid=384563)
Sistema de respawn -
Gustavo_FAB - 12.10.2012
Bom dia .. Sou Aprendiz ainda kk.
Tipo existe o comando /respawncarros.
Mais eu queria qe ele desse respawn a cada 4 horas
para nao precisar o administrador ter qe dar o /respawncarros.
Alguem pode me ajudar ?
Re: Sistema de respawn -
Delete_ - 12.10.2012
Usa um
SetTimer
Re: Sistema de respawn -
Metropole RP - 12.10.2012
PHP код:
SetTimer("rVehs", (4 * 60 * 60 * 1000), true); //OnGameModeInit
forward rVehs();
public rVehs()
{
new bool: rVeh[MAX_VEHICLES char];
for(new i; i != MAX_PLAYERS; ++i)
{
if(IsPlayerConnected(i))
{
if(!IsPlayerInAnyVehicle(i)) continue;
rVeh{GetPlayerVehicleID(i)} = true;
}
}
for(new i; i != MAX_VEHICLES; ++i) if(!rVeh{i}) SetVehicleToRespawn(i);
return 1;
}
Re: Sistema de respawn -
Gustavo_FAB - 12.10.2012
Quote:
Originally Posted by Metropole RP
PHP код:
SetTimer("rVehs", (4 * 60 * 60 * 1000), true); //OnGameModeInit
forward rVehs();
public rVehs()
{
new bool: rVeh[MAX_VEHICLES char];
for(new i; i != MAX_PLAYERS; ++i)
{
if(IsPlayerConnected(i))
{
if(!IsPlayerInAnyVehicle(i)) continue;
rVeh{GetPlayerVehicleID(i)} = true;
}
}
for(new i; i != MAX_VEHICLES; ++i) if(!rVeh{i}) SetVehicleToRespawn(i);
return 1;
}
|
Ganhou meu + , Valeu aew