help , co'ords message
#1

ok last thing today hopefully i want a message to appear when you enter
Код:
(1800.4030, 1631.5419, 2583.8723, 2621.3843)
is this possible , if the script to do is hard , please have a link or something.
Reply
#2

Код:
if (strcmp("(1800.4030, 1631.5419, 2583.8723, 2621.3843)", text, true) == 0)
{
  //do stuff
}
Reply
#3

Quote:
Originally Posted by GTA967
Код:
if (strcmp("(1800.4030, 1631.5419, 2583.8723, 2621.3843)", text, true) == 0)
{
  //do stuff
}
strcmp is for comparing strings, and nothing else, then your code is wrong.
An easier way to do what you want, is to create a pickup in position, and when the player get this pickup, a message appears.And another way, I think better Particularly, is to use the PlayerToPoint, which if I am correct server to check her into a position player.

(Sorry my bad english).
Reply
#4

im trying to make a area only rcon admins are allowed in thats the problem.
Reply
#5

ive got this
Код:
public LVWZ()
{
	for(new i=0; i<MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
			if(IsPlayerInArea(i, 1553.157, -4554.372, 2861.08, -2779.334))
			{
        GameTextForPlayer(i, "non admins turn back", 3000, 3);
			}
		}
	}
}
but it doenst work , how can i get it too? (i have got "forward LVWZ();")
Reply
#6

Код:
SetTimer("LVWZ", 1000, 1);

public LVWZ()
{
	for(new i=0; i<MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
                   new Float: x, Float: y, Float: z;
                   GetPlayerPos(i, x, y, z);
			if(x < 1553.157 && x > -4554.372 && y < 2861.08 && y > -2779.334)
			{
        GameTextForPlayer(i, "non admins turn back", 3000, 3);
			}
		}
	}
}
Not tested..
Reply
#7

Код:
stock AreaCheck(playerid)
{
	for(new p; p<GetMaxPlayers(); p++)
	{
	  if(IsPlayerAdmin(playerid) && PlayerToPoint(...))
   	{
  			//sucess mensage
 		}
		else{ SetPlayerHealth(playerid,0.0); };
}

public OnGameModeInit()
{
	SetTimer("AreaCheck",500,500);
}
Not tested;

Reply
#8

nope didnt work but im now down to this
Код:
if(IsPlayerInArea(playerid, 1553.157, -4554.372, 2861.08, -2779.334))
{
  SendClientMessage(playerid, 0x050CFAFF, "GETOUT");
  
  return 1;
}
and stilld eosnt work , any ideas
Reply
#9

Quote:
Originally Posted by Alice[A11
]
Код:
SetTimer("LVWZ", 1000, 1);

public LVWZ()
{
	for(new i=0; i<MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
                   new Float: x, Float: y, Float: z;
                   GetPlayerPos(i, x, y, z);
			if(x < 1553.157 && x > -4554.372 && y < 2861.08 && y > -2779.334)
			{
        GameTextForPlayer(i, "non admins turn back", 3000, 3);
			}
		}
	}
}
Not tested..
It worked for me. May be the SetTimer isn't in "OnGameModeInit" ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)