i need a quick help not a big deal just look in here :D
#1

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;
							}
Reply
#2

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

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

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


Forum Jump:


Users browsing this thread: