OnPlayerKeyState
#1

Hi, i have a problem with my system,

Код:
	if (newkeys == KEY_YES)
	{
	for(new i = 0; i < sizeof(RecupInfo); i++)
	{
		if (IsPlayerInRangeOfPoint(playerid, 2.0,RecupInfo[i][RecupArmePosX],RecupInfo[i][RecupArmePosY],RecupInfo[i][RecupArmePosZ]))
		{
			if(GetPlayerVirtualWorld(playerid) == RecupInfo[i][RecupArmeVWorld] && GetPlayerInterior(playerid) == RecupInfo[i][RecupArmeVWorld])
			{
   				GetPlayerName(playerid, sendername, sizeof(sendername));
         		DestroyDynamicObject(DropObject[i]);
          		RecupInfo[i][RecupArmePosX] = 0.0;
		    	RecupInfo[i][RecupArmePosY] = 0.0;
		    	RecupInfo[i][RecupArmePosZ] = 0.0;
				RecupInfo[i][RecupArmeAmmount][0] = 0;
				RecupInfo[i][RecupArmeAmmount][1] = 0;
				GivePlayerWeapon(playerid,RecupInfo[i][RecupArmeAmmount][0],RecupInfo[i][RecupArmeAmmount][1]);
				format(string, sizeof(string), "* %s a ramasser des armes.", sendername);
				SendLocalMessage(playerid, string, 10.0, COLOR_ACTION, COLOR_ACTION);
		    	return 1;
			}
		}
	}
with a command, it works, but in a key, it will not fetch arms
Reply


Messages In This Thread
[Solved]OnPlayerKeyState - by Saliim - 13.05.2016, 09:41
Re: OnPlayerKeyState - by oMa37 - 13.05.2016, 10:10
Re: OnPlayerKeyState - by Logic_ - 13.05.2016, 10:23
Re: OnPlayerKeyState - by Saliim - 13.05.2016, 10:29
Re: OnPlayerKeyState - by Konstantinos - 13.05.2016, 10:32
Re: OnPlayerKeyState - by Saliim - 13.05.2016, 10:36

Forum Jump:


Users browsing this thread: 1 Guest(s)