Little problem with aduty
#1

Hello I have made a Aduty CMD where it saves Hp, armour and pos. But when I type command in doesn't save me the pos where I was. Here is the CMD

Код:
CMD:aduty(playerid, params[])
{
	new Float:PosX, Float:PosY, Float:PosZ, Float:PosA;
	if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, -1, "This is an admin only command!");
	if(PlayerInfo[playerid][pAdminDuty] == 0)
	{

		SendClientMessageEx(playerid, COLOR_YELLOW, "You are now on administrative duty! Remember to check /reports!");
		//SetPlayerName(playerid, PlayerInfo[playerid][pAdminName]);
		PlayerInfo[playerid][pAdminDuty] = 1;
 		GetPlayerPos(playerid, PosX, PosY, PosZ);
		GetPlayerFacingAngle(playerid, PosA);
		GetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
		GetPlayerArmour(playerid, PlayerInfo[playerid][pArmor]);
 		PlayerInfo[playerid][pInt] = GetPlayerInterior(playerid);
 		PlayerInfo[playerid][pVW] = GetPlayerVirtualWorld(playerid);
		SetPlayerHealth(playerid, 100000);
		SetPlayerArmour(playerid, 100000);
		SetPlayerColor(playerid, COLOR_TWORANGE);
		//SetPlayerSkin(playerid, 294); - Commented by Voltage
		new string[128];
		format(string, sizeof(string), "Administrator %s is now on Admin Duty! (/report for assistance)", GetPlayerNameEx(playerid));
		SendClientMessageToAllEx(COLOR_YELLOW, string);
	}
	else
	{
		SendClientMessageEx(playerid, COLOR_RED, "You are now off admin duty!");
		//SetPlayerName(playerid, PlayerInfo[playerid][pNormalName]);
		PlayerInfo[playerid][pAdminDuty] = 0;
 		SetPlayerPos(playerid, PosX, PosY, PosZ);
		SetPlayerFacingAngle(playerid, PosA);
		SetPlayerHealth(playerid, PlayerInfo[playerid][pHealth]);
		SetPlayerArmour(playerid, PlayerInfo[playerid][pArmor]);
  		SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pVW]);
		SetPlayerInterior(playerid, PlayerInfo[playerid][pInt]);
		SetPlayerToTeamColor(playerid);
		//SetPlayerSkin(playerid, 299); - Commented by Voltage
		PlayerInfo[playerid][pAdminDuty] = 0;
		new string[128];
		format(string, sizeof(string), "Administrator %s is now Off Admin Duty! ( Leave the Admin to Roleplay )", GetPlayerNameEx(playerid));
		SendClientMessageToAllEx(COLOR_YELLOW, string);
	}
	return 1;
}
EDIT: When I retype the CMD it send me to Blueberry at 0.0 0.0 0.0 cordinates
Reply


Messages In This Thread
Little problem with aduty - by RenSoprano - 22.10.2012, 20:38
Re: Little problem with aduty - by SuperViper - 22.10.2012, 22:47
Re: Little problem with aduty - by RenSoprano - 24.10.2012, 18:00
Re: Little problem with aduty - by ThePhenix - 24.10.2012, 18:11
Re: Little problem with aduty - by Jarnu - 24.10.2012, 18:14
Re: Little problem with aduty - by RenSoprano - 24.10.2012, 19:16

Forum Jump:


Users browsing this thread: 1 Guest(s)