Message displayes more times
#1

Код:
CMD:checkcargo(playerid, params[])
{
	new string[60];
	for(new i; i < sizeof(meatcar); i++)
 	{
		new vehicleid = meatcar[i];
		if(IsPlayerInRangeOfVehicle(playerid, meatcar[i], 4))
		{
			format(string, sizeof(string), "You have %d bags of meat loaded.", loadedcargo[vehicleid]);
			SendClientMessage(playerid, COLOR_LIGHTGREEN, string);
			
			format(string, sizeof(string), "* %s checked the trunk.", ReturnName(playerid, 0));
 			SetPlayerChatBubble(playerid, string, COLOR_PURPLE, 30.0, 10000);
 			SendClientMessageEx(playerid, COLOR_PURPLE, "* %s checked the trunk.", ReturnName(playerid, 0));
		}
		else
		{
  			SCM(playerid, COLOR_GREY, "You are not behind a van.");
		}
	}
	return 1;
}

This message displays five times.
Код:
SCM(playerid, COLOR_GREY, "You are not behind a van.");
break doesn't work
Reply
#2

http://forum.sa-mp.com/showpost.php?...29&postcount=6

You can't say that player is not behind a van unless the loop finishes. What you basically do is send the message as many as you are not in range with a vehicle.
Reply
#3

Thanks alot
Reply
#4

Instead of making a topic every 5 minute read your old topics
https://sampforum.blast.hk/showthread.php?tid=615985
Reply
#5

Sorry.. I couldn't find it, I will give rp when I will be able
Reply
#6

Quote:
Originally Posted by AndreiWow
Посмотреть сообщение
Sorry.. I couldn't find it, I will give rp when I will be able
Go to your profile --> Statistics --> Find all threads
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)