Como para o player nascer em tais coordenadas ?
#1

Bom, nгo sou mto bom em Script and venho novamente pedir a vcs que me ajudem. Queria saber como fazer para o player nascer nessas coordenadas (mas respawn randomico, nгo sempre em uma fixa):


AddPlayerClass(265,-185.3560,1155.8925,19.5932,273.6446,0,0,0,0,0,0); //
AddPlayerClass(265,2003.4790,1543.6970,13.5859,269 .8186,0,0,0,0,0,0); //
AddPlayerClass(265,2313.9412,736.5647,10.8203,1.93 71,0,0,0,0,0,0); //
AddPlayerClass(265,1324.2953,1186.9623,10.8203,0.4 798,0,0,0,0,0,0); //
AddPlayerClass(265,1370.1152,1912.0934,10.8203,269 .2362,0,0,0,0,0,0); //
AddPlayerClass(265,1532.7701,2341.0347,10.8203,270 .1111,0,0,0,0,0,0); //
AddPlayerClass(265,2075.7766,2199.7593,10.8203,269 .8187,0,0,0,0,0,0); //
AddPlayerClass(265,2316.9099,2117.8623,10.8281,354 .6283,0,0,0,0,0,0); //
AddPlayerClass(265,2327.2104,2116.8147,10.8281,0.4 773,0,0,0,0,0,0); //
AddPlayerClass(265,2075.2634,1899.6975,18.2872,303 .1577,0,0,0,0,0,0); //
AddPlayerClass(265,2018.8212,1915.0358,12.3254,266 .8919,0,0,0,0,0,0); //
AddPlayerClass(265,2393.3518,1345.7443,10.8203,263 .6799,0,0,0,0,0,0); //
AddPlayerClass(265,2318.2573,1388.8521,10.8203,1.9 445,0,0,0,0,0,0); //
AddPlayerClass(265,1272.2156,1122.7960,10.0960,95. 5324,0,0,0,0,0,0); //

espero que me ajudem.
Reply
#2

Use o search filho di deus -.-

нnicio GM
pawn Код:
forward SetPlayerSpawn(playerid)
new Float:SpawnRandomico[][] =
{
    {X,Y,Z}, // Randomspawn
    {X,Y,Z}, // Randomspawn
    {X,Y,Z}, // Randomspawn
    {X,Y,Z} // Randomspawn
};
pawn Код:
public SetPlayerSpawn(playerid)
{
SetPlayerPos(playerid, SpawnRandomico[Random][0], SpawnRandomico[Random][1], SpawnRandomico[Random][2]);
Reply
#3

Quote:
Originally Posted by Lucas Nicolas
Посмотреть сообщение
Use o search filho di deus -.-

нnicio GM
pawn Код:
forward SetPlayerSpawn(playerid)
new Float:SpawnRandomico[][] =
{
    {X,Y,Z}, // Randomspawn
    {X,Y,Z}, // Randomspawn
    {X,Y,Z}, // Randomspawn
    {X,Y,Z} // Randomspawn
};
pawn Код:
public SetPlayerSpawn(playerid)
{
SetPlayerPos(playerid, SpawnRandomico[Random][0], SpawnRandomico[Random][1], SpawnRandomico[Random][2]);
Assim soua melhor
pawn Код:
new Float:SpawnRandomico[][3] =// Primeiro quadrado й quantas posiзгo tem o segundo й floats ( X, Y, Z );
{
    {X,Y,Z}, // Randomspawn
    {X,Y,Z}, // Randomspawn
    {X,Y,Z}, // Randomspawn
    {X,Y,Z} // Randomspawn
};
pawn Код:
public OnPlayerSpawn(playerid)
{
         new rand = random(sizeof(SpawnRadomico));
         SetPlayerPos(playerid, SpawnRandomico[rand][0], SpawnRandomico[rand][1], SpawnRandomico[rand][2]);
         return true;
}

Lucas o PAWN й Sentitive isto й, se vocк colocar ONPLAYER CONNECT ele num fungarб.
Reply
#4

\o?
й no SetPlayerSpawn fi '-'

@Felipe_Wesker

Se ainda tiver dъvida usa o search ou pega o sistema do lvdm.pwn
Reply
#5

Quote:
Originally Posted by Lucas Nicolas
Посмотреть сообщение
Use o search filho di deus -.-

нnicio GM
pawn Код:
forward SetPlayerSpawn(playerid)
new Float:SpawnRandomico[][] =
{
    {X,Y,Z}, // Randomspawn
    {X,Y,Z}, // Randomspawn
    {X,Y,Z}, // Randomspawn
    {X,Y,Z} // Randomspawn
};
pawn Код:
public SetPlayerSpawn(playerid)
{
SetPlayerPos(playerid, SpawnRandomico[Random][0], SpawnRandomico[Random][1], SpawnRandomico[Random][2]);
Cara, eu tenho q por esses 2 codes ou sу o primeiro??
Reply
#6

@Topico
Leia direito o code mano

@OFF
HomeHots Ownada riariariariarairaira

@Canabis
Seu maconhero me desban lб -.-
Reply
#7

A funзгo SetPlayerSpawn й particular do Thug/GF


Para ser adequado para qualquer tipo de gamemode coloque:


pawn Код:
//No Topo do GM
new Float:RandomSpawn[][4] =//Mude o 4 para 5 se quiser aumentar o nъmero de lugares de 3 para 4
{
    {-2796.9854, 1224.8180, 20.5429, 192.0335},//Coordenadas de 1 lugar ficam aqui
    {-2454.2170, 503.8759, 30.0790, 267.2932},//Coordenadas de 1 lugar ficam aqui
    {-2669.7322, -6.0874, 6.1328, 89.8853}//Coordenadas de 1 lugar ficam aqui
};


//No OnPlayerSpawn

new rand = random(sizeof(RandomSpawn));

SetPlayerPos(playerid, RandomSpawn[rand][0], RandomSpawn[rand][1],RandomSpawn[rand][2]);
SetPlayerFacingAngle(playerid, RandomSpawn[rand][3]);
return 1;

Para mais informaзхes pesquise no ****** sobre "SA-MP Random".


Espero ter ajudado
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)