Posts: 725
Threads: 4
Joined: Nov 2010
Reputation:
0
You have roleplay mod with new system which saves the player his position when he exists the server and when he logs back, he spawns there? if so, show us your script, at least some of it... OnPlayerDisconnect, etc.
Posts: 79
Threads: 9
Joined: Apr 2011
Reputation:
0
Here is it
public OnPlayerDisconnect(playerid, reason)
{
AdvertTimer[playerid] = 0;
new string[128];
new sendername[MAX_PLAYER_NAME];
new caller = Mobile[playerid];
gActivePlayers[playerid]--;
numplayers--;
PlayerInfo[playerid][pAdjustable] = 1;
if(HasPlantWeed[playerid] != 0) DestroyObject(Weed[playerid]);
DestroyPickup(BizPickupTemp[playerid]); Delete3DTextLabel(Text3D:Biz3dTextID[playerid]);
GetPlayerName(playerid, sendername, sizeof(sendername));
switch(reason)
{
case 0: format(string, sizeof(string), "* %s has left the server. (Timeout)", sendername);
case 1: format(string, sizeof(string), "* %s has left the server. (Leaving)", sendername);
case 2: format(string, sizeof(string), "* %s has left the server. (Kicked)", sendername);
}
if(PlayerInfo[playerid][pAdmin] < 2)
{
ProxDetector(30.0, playerid, string, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW, COLOR_YELLOW);
}
if(PlayerTied[playerid] > 0 || PlayerCuffed[playerid] > 0 && PlayerInfo[playerid][pJailed] == 0)
{
PlayerInfo[playerid][pJailed] = 1; PlayerInfo[playerid][pJailTime] = 800;
}
OnPlayerSave(playerid);
new x = 0;
while(x != MAX_PLAYERS)
{
if(IsPlayerConnected(x) && GetPlayerState(x) == PLAYER_STATE_SPECTATING && SpectatedID[x] == playerid)
{
SetPlayerHealth(x, PlayerInfo[x][pHealth]);
SetPlayerArmour(x, PlayerInfo[x][pArmor]);
SetPlayerVirtualWorld(x, PlayerInfo[x][pVirtualWorld]);
SetPlayerInterior(x, PlayerInfo[x][pInt]);
SetPlayerPos(x, PlayerInfo[x][pSPos_x], PlayerInfo[x][pSPos_y], PlayerInfo[x][pSPos_z]);
SetPlayerFacingAngle(x, PlayerInfo[x][pSPos_r]);
SendClientMessage(x, COLOR_WHITE, "You are no longer spectating.");
TogglePlayerSpectating(x, 0);
SpectatedID[x] = INVALID_PLAYER_ID;
SpectateType[x] = ADMIN_SPEC_TYPE_NONE;
HidePM[x] = 0;
PhoneOnline[x] = 0;
ResetPlayerAdminWeaponsEx(x);
}
x++;
}
Posts: 781
Threads: 12
Joined: May 2011
Reputation:
0
You can simply do what Adil said. Go to your OnPlayerLogin callback and use the SetPlayerPos function. It will 'force' them to the position in which you set.