![]() |
[Ajuda] Me ajuda cria sistema de morrer renascer na arena - Versão de Impressão +- Portal SAMP (https://portalsamp.com) +-- Fórum: SA-MP (https://portalsamp.com/forumdisplay.php?fid=5) +--- Fórum: Área de suporte (https://portalsamp.com/forumdisplay.php?fid=6) +--- Tópico: [Ajuda] Me ajuda cria sistema de morrer renascer na arena (/showthread.php?tid=4246) |
Me ajuda cria sistema de morrer renascer na arena - Whaispe - 28/11/2023 Eu tinha feito um sistema de morrer e renascer na arena soque dai não funcionou dai to querendo ajuda de algm que entende bem. por onde eu começo? enum ArenaType { SEM_ARENA, DESERT_ARENA, MP5_ARENA, SNIPER_ARENA, CBUG_ARENA, AK_ARENA, M4_ARENA }; new Float:SRandom[][3] = { {268.4812, 185.2742, 1008.1719}, {288.7050, 169.1827, 1007.1719}, {246.2589, 196.5596, 1008.1719}, {231.1914, 144.5740, 1003.0234}, {205.4314, 175.3142, 1003.0326}, {205.4314, 175.3142, 1003.0326} }; new g_InArena[MAX_PLAYERS]; new g_ArenaType[MAX_PLAYERS]; aqui as variaveis CMD:m4(playerid) { if(Logado[playerid] < 1) return SCM(playerid, VERMELHO, "ERROR:{ffffff} Voce nao pode usar comandos sem esta logado!!"); if(g_InArena[playerid]) return SCM(playerid, -1, "{FFFF00}Voce esta em uma arena use /sair"); GivePlayerWeapon(playerid, 31, 750); SetPlayerArmour(playerid, 100.0); SetPlayerHealth(playerid, 100.0); SetPlayerInterior(playerid, 3); new spawn = random(sizeof(SRandom)); SetPlayerPos(playerid, SRandom[spawn][0], SRandom[spawn][1], SRandom[spawn][2]); SetPlayerVirtualWorld(playerid, 10); g_ArenaType[playerid] = M4_ARENA; g_InArena[playerid] = true; SCM(playerid, -1, "{FFFF00}Voce entrou na arena M4 para sair use /SAIR"); return 1; } Se algm pode me ajuda agradeço mtt RE: Me ajuda cria sistema de morrer renascer na arena - Whaispe - 28/11/2023 public OnPlayerSpawn(playerid) { if(g_ArenaType[playerid] == M4_ARENA) { new spawn = random(sizeof(SRandom)); SetPlayerPos(playerid, SRandom[spawn][0], SRandom[spawn][1], SRandom[spawn][2]); SetPlayerArmour(playerid, 100.0); SetPlayerHealth(playerid, 100.0); } if(g_ArenaType[playerid] == DESERT_ARENA) { new spawn = random(sizeof(SRandomDESERT)); SetSpawnInfo(playerid, SRandomDESERT[spawn][0], SRandomDESERT[spawn][1], SRandomDESERT[spawn][2]); SetPlayerArmour(playerid, 100.0); SetPlayerHealth(playerid, 100.0); g_InArena[playerid] = true; } return 1; } consegui fazer porem o spawn aleatorio nao esta funcionando apenas quando boto coordenadas x,y,z, por mais de quando vc entra na arena esse spawn aleatorio funcione, oq eu faço? |