29.08.2015, 19:35
gente eu estou criando uma gamemode e ela tem sistema de spawn aleatorio e salvar posiзгo ex : quando o player morrer ele vai nascer em uma nova posiзгo porem quando o player morre ao invez de ir pra outro spawn ele vai pra mesma posiзгo que ele spawno antes.
spawns
onplayerspawn
o sistema que salva a posiзгo e quando o player da spawn e teleportado
spawns
PHP код:
new Float:RandomSpawns[35][4] =
{
{2939.3958,-606.1293,5.5778,94.7880},
{-77.6464,-1629.3710,3.7343,280.4382},
{206.3472,154.2905,2.3358,181.0434},
{-2817.3206,2727.3481,236.7029,262.8847},
{-2542.0942,1406.4088,5.9139,191.8668},
{-2917.7283,-889.0153,3.1419,316.8505},
{-2723.7112,-2428.6316,4.4273,288.1584},
{260.2506,2905.0747,7.1563,175.3873},
{2781.4458,604.3503,9.4818,20.5249},
{2153.9929,-112.0651,2.3084,13.7600},
{-339.2062,-444.5681,4.0358,102.4640},
{258.0997,2939.1514,1.7661,178.4244},
{1688.2180,-2731.7292,9.4693,180.6178},
{1688.2180,-2731.7292,9.4693,180.6178},
{129.5016,-1763.0736,5.4249,312.5323},
{220.3669,-233.3869,1.7786,42.7497},
{633.1784,-598.7915,16.3359,273.9685},
{-343.2381,1538.3112,80.4266,180.6176},
{1666.1603,1474.2776,10.7755,269.3152},
{2785.0378,710.2653,10.8912,115.5138},
{-1459.0962,2699.2815,55.8359,195.7046},
{-2387.5447,2215.6553,4.9844,88.8569},
{-2106.0325,167.3820,35.0691,321.0158},
{-2946.0522,974.2535,13.9277,258.6619},
{-2229.3057,-1743.5945,480.8813,222.0331},
{-2610.8232,-2729.7227,6.5595,289.7137},
{-955.2931,-2357.0247,60.9880,101.1086},
{-201.6451,-2263.7766,29.3455,311.3806},
{1125.8311,-2036.9128,69.8801,272.8402},
{2903.2417,-1930.4924,2.2940,89.2251},
{2918.8140,-726.6842,9.9818,87.4152},
{-1568.6575,-2729.0886,48.7435,63.0969},
{-71.0752,-1574.0936,2.6172,191.1192},
{-2053.7346,-2544.4180,31.0668,148.1078},
{2069.9150,-411.8249,110.5751,61.2491}
};
PHP код:
if(SpwRnd[playerid] == true)
{
new Random = random(sizeof(SpwRnd));
SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]);
SpwRnd[playerid] = false;
}
PHP код:
SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);//Seta a Skin do player
SetPlayerPos(playerid, PlayerInfo[playerid][pX], PlayerInfo[playerid][pY], PlayerInfo[playerid][pZ]);
SetPlayerAttachedObject(playerid, 0, ObjetoMochila_Pouch, 1, 0.241894, -0.160918, 0.181463, 0, 90, 0, 1, 1, 1);