[Include] [ASF] Advanced Spawn Functions - 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)
+----- Forum: Lançamentos/Releases (
https://sampforum.blast.hk/forumdisplay.php?fid=56)
+----- Thread: [Include] [ASF] Advanced Spawn Functions (
/showthread.php?tid=649753)
[ASF] Advanced Spawn Functions -
RazorGuigo - 14.02.2018
uma include simples, com intuito de facilitar o uso do spawn, para que fique de maneira simples!
features:
PHP Code:
Spawn(playerid, skin, Float:x,Float:y,Float:z, Float:a=0.0, time = 0)//main function to give spawn
//skin -1 is random, or value chosen
//x,y,z are coordinates
//a is angled
//time how long will spawn
GetSpawnTimerID(playerid)//settimerex id
GetSpawnTimeLeft(playerid, from=-1)//Remaining time to spawn (-1 for current time, or use custom timestamp)
bool:IsSpawnProgrammed(playerid)//the player is waiting for a spawn
CancelSpawn(playerid)//cancel spawn on hold
RANDOMSPAWN<list>//spawn will be drawn, with the coordinates of an example list below:
RANDOM_SKIN//random skin from 0 to 299
exemplo do random spawn:
PHP Code:
new Float:posicoes[4][3]=
{
{2334.7942,2444.2695,5.6833},
{2237.4199,2453.0857,10.6711},
{1545.0884,-1627.2146,13.4828},
{1588.9736,-1637.3667,13.5381}
};
public OnPlayerConnect(playerid)
{
Spawn(playerid, -1, RANDOMSPAWN<posicoes>,0.0, 1000);
return 1;
}
https://pastebin.com/wFhRHTsC
Bom uso desta include!
estou com preguiзa de fazer um topico bonito, mas o que importa й o realese!
Re: [ASF] Advanced Spawn Functions -
SpikeCompiler - 14.02.2018
Good job, legal good to include.
Re: [ASF] Advanced Spawn Functions -
IlanZ - 14.02.2018
Maneiro, pode ajudar alguns novatos.