19.03.2014, 20:09
Hey there well.
On my script i changed the spawn point of the new players when they just registered but it keep spawn at the same position and i tested the coords that i deleted and its the exactly the same on the spawn point but then i deleted it and made an spawn poisition but it keep spawn at the same position. And i of course compiled and restarted the server with no errors of course here is coods
And this is the new coords i changed
and this is the old one that spawn at blueberry
On my script i changed the spawn point of the new players when they just registered but it keep spawn at the same position and i tested the coords that i deleted and its the exactly the same on the spawn point but then i deleted it and made an spawn poisition but it keep spawn at the same position. And i of course compiled and restarted the server with no errors of course here is coods
Код:
public SetPlayerSpawn(playerid) // Sorensen { StopPlayerSpec(playerid); SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pPosX], PlayerInfo[playerid][pPosY], PlayerInfo[playerid][pPosZ], 1.0, -1, -1, -1, -1, -1, -1); SpawnPlayer(playerid); new house = PlayerInfo[playerid][pHouseKey]; if(GetIntVar(playerid, "JustDoneRegister") == 1) { ToggleMainMenu(playerid, 0); ShowHudTextDraws(playerid, 1); StopAudioStreamForPlayer(playerid); StopPlayerSpec(playerid); SetIntVar(playerid, "gLogged", 1); RemoveVar(playerid, "JustDoneRegister"); SetWorld(playerid, 0); ClearChatbox(playerid, 50); ClearChatbox(playerid, 100); SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pSkin], 1685.4147,-2333.4783,-2.6797,359.0640, -1, -1, -1, -1, -1, -1); /* spawnairport */ ServerMSG(playerid, "It's your first time in the server use /help for the server commands."); ServerMSG(playerid, "You can also use /helpme to get help from our {00FF00}OnDuty{FFFFFF} helpers."); PlayerInfo[playerid][pRegistered] = 1; PlayerInfo[playerid][pLevel] = 1; PlayerInfo[playerid][pCellPhone] = 1; PlayerInfo[playerid][pNumber] = randomEx(1234567, 9999999); ShowHunger(playerid); SetFightStyle(playerid, F_GRABKICK); ScoreUpdate(playerid); SetCash(playerid, 10000); SetBankCash(playerid, 10000); SetNormalColor(playerid); SetInterior(playerid,0); SavePlayerStats(playerid); SetPlayerSpawn(playerid); return 1; } if(PlayerInfo[playerid][pJailed] == 1) { SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pSkin], 2576.7861,2712.2004,22.9507, 1.0, -1, -1, -1, -1, -1, -1); SetPlayerPos(playerid, 2576.7861,2712.2004,22.9507); PlayerInfo[playerid][pDied] = 0; RemoveVar(playerid, "JustDied"); SetInterior(playerid,0); SetWorld(playerid, 0); ServerMSG(playerid, "You're still admin jailed."); } else if(PlayerInfo[playerid][pJailed] == 2) { PutPlayerInCell(playerid); PlayerInfo[playerid][pDied] = 0; RemoveVar(playerid, "JustDied"); SetInterior(playerid, 10); SetWorld(playerid, 0); SCM(playerid, COLOR_GRAD2, "You were jailed when you logged out."); } else if(PlayerInfo[playerid][pJailed] == 3) { FreezePlayer(playerid); SetTimerEx("UnFreezePlayer", 3000, 0, "i", playerid); SetInterior(playerid, 0); SetWorld(playerid, 0); PutPlayerInPrisonCell(playerid); PlayerInfo[playerid][pDied] = 0; RemoveVar(playerid, "JustDied"); } else { if(PlayerInfo[playerid][pDied] == 1) { PutPlayer(playerid, PlayerInfo[playerid][pPosX],PlayerInfo[playerid][pPosY],PlayerInfo[playerid][pPosZ]); SetInterior(playerid, PlayerInfo[playerid][pInt]); SetWorld(playerid, PlayerInfo[playerid][pWorld]); SetIntVar(playerid, "LoggedInDead", 1); SetPlayerHealth(playerid, 1000.0); SetPlayerCameraPos(playerid,PlayerInfo[playerid][pPosX]+3,PlayerInfo[playerid][pPosY]+3,PlayerInfo[playerid][pPosZ]+3); SetPlayerCameraLookAt(playerid,PlayerInfo[playerid][pPosX],PlayerInfo[playerid][pPosY],PlayerInfo[playerid][pPosZ]); SetTimerEx("FreezePlayer", 100, 0, "i", playerid); SetTimerEx("DeadAnim", 1000, 0, "i", playerid); SCM(playerid, COLOR_YELLOW, "You are brutally wounded, you may wait for a medic or '/acceptdeath'."); } else if(PlayerInfo[playerid][pCrashed] == 1 && PlayerInfo[playerid][pFaction] == 0) { PlayerInfo[playerid][pCrashed] = 0; PutPlayer(playerid, PlayerInfo[playerid][pPosX],PlayerInfo[playerid][pPosY],PlayerInfo[playerid][pPosZ]); SetInterior(playerid, PlayerInfo[playerid][pInt]); SetWorld(playerid, PlayerInfo[playerid][pWorld]); } else if(PlayerInfo[playerid][pSpawnType] == 1) { if(house == -1) { SCM(playerid, COLOR_LIGHTRED, "You don't have a house anymore so you have spawned normaly."); PlayerInfo[playerid][pSpawnType] = 0; } else { PutPlayer(playerid, HouseInfo[house][hExitX], HouseInfo[house][hExitY],HouseInfo[house][hExitZ]); SetInterior(playerid,HouseInfo[house][hInterior]); SetWorld(playerid,HouseInfo[house][hWorld]); HouseEntered[playerid] = house; FreezePlayer(playerid); SetTimerEx("UnFreezePlayer", 4000, 0, "i", playerid); } } else if(PlayerInfo[playerid][pSpawnType] == 2) { if(PlayerInfo[playerid][pFaction] == 0) { SCM(playerid, COLOR_LIGHTRED, "You are not in a faction anymore so you have spawned normaly."); PlayerInfo[playerid][pSpawnType] = 0; } else { PutPlayer(playerid,Factions[PlayerInfo[playerid][pFaction]][fX],Factions[PlayerInfo[playerid][pFaction]][fY],Factions[PlayerInfo[playerid][pFaction]][fZ]); SetInterior(playerid, Factions[PlayerInfo[playerid][pFaction]][fSpawnInt]); SetWorld(playerid,0); FreezePlayer(playerid); SetTimerEx("UnFreezePlayer", 900, 0, "i", playerid); } } else if(PlayerInfo[playerid][pSpawnType] == 0) { SetInterior(playerid,0); SetWorld(playerid, 0); } } return 1; }
Код:
SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pSkin], 1685.4147,-2333.4783,-2.6797,359.0640, -1, -1, -1, -1, -1, -1); /* spawnairport */
Код:
SetSpawnInfo(playerid, 0, PlayerInfo[playerid][pSkin], 321.8450,-30.1416,1.6294,179.8916, -1, -1, -1, -1, -1, -1); /* spawnblueberry */