Bug in /planedm
#1

Hi Guyz..
I need your help.
I have created a command, /planedm and i have saved it's position....but there's some mistake there because when i try to test it by /planedm the player keeps falling down like this:



Here is the script:
Код:
COMMAND:planedm(playerid, params[])
{
	new string[128];
	if(PlayerInfo[playerid][pSpawned] == 1)
	{

	if(ServerInfo[sBlockTele] == 1)
	{
	SendClientMessage(playerid,COLOR_ERROR,"This Command Is Disabled By An Adminstrator.");
	return 1;
	}

	if(InSniper[playerid] == 1)
	{
	SendClientMessage(playerid,COLOR_ERROR,"You Cannot Use This Command In Sniper DM.");
	return 1;
	}

	if(InDMS[playerid] == 1)
	{
	SendClientMessage(playerid,COLOR_ERROR,"You Cannot Use This Command In Deathmatch Stadium.");
	return 1;
	}

	if(InMDM[playerid] == 1)
	{
	SendClientMessage(playerid,COLOR_ERROR,"You Cannot Use This Command In Minigun DM.");
	return 1;
	}

	if(Freezed[playerid] == 1)
	{
	SendClientMessage(playerid,COLOR_ERROR,"You Cannot Use This Command While Freezed.");
	return 1;
	}

	if(PlayerInfo[playerid][pJailed] == 1)
	{
	SendClientMessage(playerid,COLOR_ERROR,"You Cannot Use This Command in Jail.");
	return 1;
	}

	if(Caged[playerid] == 1)
	{
	SendClientMessage(playerid,COLOR_ERROR,"You Cannot Use This Command While Caged.");
	return 1;
	}

	if(InDuel[playerid] == 1)
	{
	SendClientMessage(playerid,COLOR_ERROR,"You Cannot Use This Command While in Duel Challenge.");
	return 1;
	}

	if(PlayerInfo[playerid][pTeleTime] > 0)
	{
	SendClientMessage(playerid,COLOR_ERROR,"Please Wait Before Teleporting Again.");
	return 1;
	}
    SetPlayerInterior(playerid, 73);
	SetPlayerPosEx(playerid,1.6274,31.5907,1199.6012,182.6938,0,0);
	SetCameraBehindPlayer(playerid);

	SendClientMessage(playerid,COLOR_ORANGE,"You Have Been Successfully Teleported To Plane DM.");

	format(string, sizeof(string), "%s (%d) Has Been Teleported To plane. (/planedm)",PlayerInfo[playerid][pName],playerid);
	SendClientMessageToOthers(playerid,COLOR_ORANGE,string);

	PlayerInfo[playerid][pTeleTime] = 7;
	}else{
	SendClientMessage(playerid,COLOR_ERROR,"You Cannot Use This Command While You're Dead.");
	}
    return 1;
}
Reply
#2

If you use dynamic objects, make sure that they're streamed in first before setting the player's position (Streamer_UpdateEx). Also make sure that you choose the correct interior and virtual world, if applicable.
Reply
#3

I didnt Get you..Can you explain more?
Reply
#4

Quote:
Originally Posted by Vince
Посмотреть сообщение
If you use dynamic objects, make sure that they're streamed in first before setting the player's position (Streamer_UpdateEx). Also make sure that you choose the correct interior and virtual world, if applicable.
^^^^
You could also try making a 5(can be more/less) second timer to freeze the player, then unfreezing the player once timer ended
Reply
#5

Nono, You have totally changed it :/
Read that script and help.
Reply
#6

change the interior and make sure that you have correct saved positions
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)