SA-MP Forums Archive
i need a quick help not a big deal just look in here :D - 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: i need a quick help not a big deal just look in here :D (/showthread.php?tid=82741)



i need a quick help not a big deal just look in here :D - Pawel_Shark - 20.06.2009

error 017: undefined symbol "newkeys"

Код:
public OnPlayerKeyStateChange(playerid, neykeys, oldkeys)
{
	new string[256];
	new giveplayer[MAX_PLAYER_NAME];
	new playername[MAX_PLAYER_NAME];
	new giveplayerid, moneys, idx;
	if(newkeys == KEY_ENTER)
	{
	  if(IsPlayerConnected(playerid))
		{
			for(new i = 0; i < sizeof(HouseInfo); i++)
			{
				if (PlayerToPoint(3, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
				{
					//printf("Found House :%d",i);
					if(PlayerInfo[playerid][pPhousekey] == i || HouseInfo[i][hLock] == 0)
					{
						SetPlayerInterior(playerid,HouseInfo[i][hInt]);
						SetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]);
						GameTextForPlayer(playerid, "~w~Witaj w domu", 5000, 1);
						PlayerInfo[playerid][pInt] = HouseInfo[i][hInt];
						PlayerInfo[playerid][pLocal] = i;
					}
					else
					{
						GameTextForPlayer(playerid, "~r~Zamkniety", 5000, 1);
					}
				}
			}
			for(new i = 0; i < sizeof(BizzInfo); i++)
			{
				if (PlayerToPoint(3, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
				{
					//printf("Found House :%d",i);
					if(!IsACop(playerid) && i == 3)
					{
					  SendClientMessage(playerid, COLOR_GREY, "  Tylko policja !");
					  return 1;
					}
					if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerMoney(playerid) >= BizzInfo[i][bEntranceCost])
					{
..........
						if(PlayerInfo[playerid][pPbiskey] != i)
						{
							if(BizzInfo[i][bLocked] == 1)
							{
								GameTextForPlayer(playerid, "~r~Zamkniete", 5000, 1);
								return 1;
							}



Re: i need a quick help not a big deal just look in here :D - Correlli - 20.06.2009

Change:
pawn Код:
public OnPlayerKeyStateChange(playerid, neykeys, oldkeys)
to:
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)



Re: i need a quick help not a big deal just look in here :D - Pawel_Shark - 20.06.2009

thx, but another problem appeared : error 017: undefined symbol "KEY_ENTER"


Re: i need a quick help not a big deal just look in here :D - Correlli - 20.06.2009

That key-name doesn't exist. It's KEY_SECONDARY_ATTACK.
https://sampwiki.blast.hk/wiki/GetPlayerKeys#Key_List