help please
#1

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?
Reply
#2

Код:
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;
}
Reply
#3

ty
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)