Help - it's really easy for you, but hard for me.
#1

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/enter", cmdtext, true, 10) == 0)
	{
    (IsPlayerInRangeOfPoint(playerid, 1.0, 172.66, -152.10, 1.72)); // checks if in range of the /enter point

        SetPlayerPos(playerid, 170.75, -153.94, 1.81); //Sets there new position
		RemoveObjectVar2 = RemoveBuilding(12923, 158.3594, -176.3047, 5.5703, 0.25);
		RemoveObjectVar2 = RemoveBuilding(12923, 158.3594, -176.3047, 5.5703, 0.25);
		RemoveObjectVar2 = RemoveBuilding(12923, 158.3594, -176.3047, 5.5703, 0.25);
				        return 1;
    }
   if (strcmp("/exit", cmdtext, true, 10) == 0)
   {
   if(IsPlayerInRangeOfPoint(playerid, 1.0, 170.85, -153.85, 1.48)) // Checks if near the exit door
    {
               SetPlayerPos(playerid, 172.24, -152.26, 1.81);
               RestoreBuilding(RemoveObjectVar2);
               RestoreBuilding(RemoveObjectVar2);
               RestoreBuilding(RemoveObjectVar2);
    }
    return 1;
}
What I want is for the objects to be removed only for the player that types the command, and for them to be restored the same, only for the player who types the command. How can I do that?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)