SA-MP Forums Archive
help please - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: help please (/showthread.php?tid=128647)



help please - bartje01 - 18.02.2010

Hey guys. I have a script:

if(IsPlayerInRangeOfPoint(playerid, 1.0, 294.7390,-38.4376,1001.5156))
{
SendClientMessage(playerid,0xFFFFFFFF,"/buygun tec-9 , mp5, sawnoff, deagle, grenade, m4");
SendClientMessage(playerid,0xFFFFFFFF," PRICES : tec-9 2.500$ , mp5 4.000$, sawnoff 7.000$, deagle 1.200$, grenade 9.000$, m4 10.000$");

But when I stand at that position it just spams the messages. I just want them to come one time. not spamming them.
How to fix?


Re: help please - iron_war_lord - 18.02.2010

Код:
new Bool:bIsPlayerAtBuyPoint[MAX_PLAYER] = 1;

if(IsPlayerInRangeOfPoint(playerid, 1.0, 294.7390,-38.4376,1001.5156))
{
	if(bIsPlayerAtBuyPoint[playerid] == 1)
	{
  	SendClientMessage(playerid,0xFFFFFFFF,"/buygun tec-9 , mp5, sawnoff, deagle, grenade, m4");
  	SendClientMessage(playerid,0xFFFFFFFF," PRICES : tec-9 2.500$ , mp5 4.000$, sawnoff 7.000$, deagle 1.200$, grenade 9.000$, m4 10.000$");
  	bIsPlayerAtBuyPoint[playerid] = 0;
	}
}
else if(!IsPlayerInRangeOfPoint(playerid, 1.0, 294.7390,-38.4376,1001.5156))
{
	bIsPlayerAtBuyPoint[playerid] = 1;
}



Re: help please - bartje01 - 18.02.2010

ty