04.03.2014, 23:09
seguinte , to com um FS que spawn random e que salva a localidade do player qnd ele desloga ,
e fico assim
mais ele da respawn onde deslogou mais quando more , ele vai pra um respawn random mais em menos de 1 segundo ele more e respwna como se n tivese cordenada .
eu so precisaa que ele so desse spawn random qnd nao ouvesse arquivo da posiзao e quando morer
pf ajuda plz !
e fico assim
Quote:
#include <a_samp> #include <Dini> #pragma tabsize 0 new Float:RandomSpawns[][] = { {1958.3783, 1343.1572, 15.3746, 269.1425}, {2279.9985, -615.3870, 134.5559, 228.3854}, {2279.9985, -615.3870, 134.5559, 228.3854}, {2553.1404, -952.1654, 82.6709, 106.1843}, {2432.2146, -2423.9443, 13.6276, 230.5788}, {1477.2146, -2027.1406, 31.9044, 230.5788}, {698.2166, -1461.7200, 8.9766, 8.7601}, {-15.4324, -2503.9709, 36.6555, 102.1343}, {-32.4647, -1149.8997, 1.7430, 102.7609}, {-2203.6240 ,-2387.5686, 30.8311, 237.1823}, {-2095.1865 ,-2256.5686, 36.1356, 237.1823}, {-2098.9272 ,-2261.9961, 30.6250, 138.7222}, {-2302.7112 ,-1630.5436, 483.7253, 211.4162}, {-2499.9785 ,-612.6174, 132.5625, 262.4666}, {-2122.1563 ,269.3272, 35.6318, 262.4666}, {-2474.0337 ,2520.6338, 17.7863, 279.4102}, {-1532.3290, 2626.8054, 55.8359, 3.071,0}, {-544.0884, 2591.6729, 53.5156, 280.3736}, {-174.0884, 2676.4385, 62.6836, 280.3736}, {1290.6293, 1653.7976, 10.8203, 38.1646}, {1757.8960, 2766.7656, 10.8359, 200.4943} }; new Float:KenX[MAX_PLAYERS]; new Float:KenY[MAX_PLAYERS]; new Float:KenZ[MAX_PLAYERS]; new Float:KenA[MAX_PLAYERS]; new SpawnBloqueado[MAX_PLAYERS]; public OnFilterScriptInit() { return 1; } public OnPlayerConnect(playerid) { SpawnBloqueado[playerid] = 0; SendClientMessage(playerid, 0x33FF00FF, "[Server] Seja Bem Vindo ao Melhor DayZ Do Brasil !!"); return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/fdps", cmdtext, true, 10) == 0) { SendClientMessage(playerid, 0x33FF00FF, "Oha a Boca"); return 1; } return 0; } public OnPlayerDisconnect(playerid, reason) { new Jogador[MAX_PLAYER_NAME]; new data[256]; GetPlayerName(playerid, Jogador, sizeof(Jogador)); GetPlayerPos(playerid,KenX[playerid],KenY[playerid],KenZ[playerid]); GetPlayerFacingAngle(playerid,KenA[playerid]); format(data, sizeof(data), "%s.spawn.ini", Jogador); dini_FloatSet(data,"CoordenadaX",KenX[playerid]); dini_FloatSet(data,"CoordenadaY",KenY[playerid]); dini_FloatSet(data,"CoordenadaZ",KenZ[playerid]); dini_FloatSet(data,"CoordenadaA",KenA[playerid]); return 1; } public OnPlayerSpawn(playerid) { new VolteiPraCa[MAX_PLAYER_NAME]; new voltarcoordenada[256]; GetPlayerName(playerid, VolteiPraCa, sizeof(VolteiPraCa)); format(voltarcoordenada, sizeof(voltarcoordenada), "%s.spawn.ini", VolteiPraCa); if(fexist(voltarcoordenada) && SpawnBloqueado[playerid] == 0) { KenX[playerid] = dini_Float(voltarcoordenada,"CoordenadaX"); KenY[playerid] = dini_Float(voltarcoordenada,"CoordenadaY"); KenZ[playerid] = dini_Float(voltarcoordenada,"CoordenadaZ"); KenA[playerid] = dini_Float(voltarcoordenada,"CoordenadaA"); SetPlayerPos(playerid, KenX[playerid], KenY[playerid], KenZ[playerid]); SetPlayerFacingAngle(playerid, KenA[playerid]); SetCameraBehindPlayer(playerid); SpawnBloqueado[playerid] = 1; } if(!fexist(voltarcoordenada)) { dini_Create(voltarcoordenada); SpawnBloqueado[playerid] = 1; } new Random = random(sizeof(RandomSpawns)); SetPlayerPos(playerid, RandomSpawns[Random][0], RandomSpawns[Random][1], RandomSpawns[Random][2]); SetPlayerFacingAngle(playerid, RandomSpawns[Random][3]); return 1; } public OnFilterScriptExit() { return 1; } |
eu so precisaa que ele so desse spawn random qnd nao ouvesse arquivo da posiзao e quando morer
pf ajuda plz !