Teleport Help
#1

For some reason when I do /gotolspd the room is bugged like, I appear and I see a pickup floating but I'm falling through the sky, how do I make to so when I teleport I can see/stand on the floor etc. Is my script wrong? Script below.

Code:
	if(strcmp(cmd, "/gotolspd", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(PlayerInfo[playerid][pAdmin] >= 1)
			{
				if (GetPlayerState(playerid) == 2)
				{
					SetVehicleToRespawn(GetPlayerVehicleID(playerid));
					SafeRemovePlayerFromVehicle(playerid);
					SafeSetPlayerPos(playerid, 255.1596,77.6557,1003.6406);
					SafeSetPlayerInterior(playerid,0);
				}
				else
				{
					SafeSetPlayerPos(playerid, 255.1596,77.6557,1003.6406);
					SetPlayerVirtualWorld(playerid, 0);
					SafeSetPlayerInterior(playerid,0);
				}
				SafeSetPlayerInterior(playerid,0);
				DisablePlayerCheckpoint(playerid);
				OnPlayerExitFood(playerid);
				new y, m, d;
				new h,mi,s;
				getdate(y,m,d);
				gettime(h,mi,s);
				format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Teleported Himself to Los Santos Police Department",d,m,y,h,mi,s,sendername);
				TelesLog(string);
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "** You are not authorized to use that command !");
				return 1;
			}
		}
		return 1;
	}
Reply
#2

If your using the default Interior by GTA SA, then change
SafeSetPlayerInterior(playerid,0);

To

SafeSetPlayerInterior(playerid,LSPD_INT);

To find out about the interior, go inside the interior and /interior to see the interior id, Profit?
Reply
#3

It has got something to do with interiors, i believe.Get LSPD's interior id and set it with SetPlayerInterior(playerid, interior id of LSPD);
Reply
#4

Quote:
Originally Posted by Aira
View Post
If your using the default Interior by GTA SA, then change
SafeSetPlayerInterior(playerid,0);

To

SafeSetPlayerInterior(playerid,LSPD_INT);

To find out about the interior, go inside the interior and /interior to see the interior id, Profit?
Yeah I did /interior (Didn't know I could do that :P) and it said 6 so I presume I replace it with SafeSetPlayerInterior(playerid, 6); Correct?

Edit: It didn't work, I fell
Reply
#5

New code: still doesn't work

Code:
if(strcmp(cmd, "/gotolspd", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(PlayerInfo[playerid][pAdmin] >= 1337)
			{
				if (GetPlayerState(playerid) == 2)
				{
					SetVehicleToRespawn(GetPlayerVehicleID(playerid));
					SafeRemovePlayerFromVehicle(playerid);
					SafeSetPlayerPos(playerid, 255.1596,77.6557,1003.6406);
					SafeSetPlayerInterior(playerid, 6);
				}
  				else
				{
					SafeSetPlayerPos(playerid, 255.1596,77.6557,1003.6406);
					SetPlayerVirtualWorld(playerid, 0);
					SafeSetPlayerInterior(playerid,6);
				}
				SafeSetPlayerInterior(playerid,0);
				DisablePlayerCheckpoint(playerid);
				OnPlayerExitFood(playerid);
				new y, m, d;
				new h,mi,s;
				getdate(y,m,d);
				gettime(h,mi,s);
				format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Teleported Himself to Los Santos Police Department",d,m,y,h,mi,s,sendername);
				TelesLog(string);
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "** You are not authorized to use that command !");
				return 1;
			}
		}
		return 1;
	}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)