error 017: undefined symbol "newkeys"
#1

error 017: undefined symbol "newkeys"
What's the problem? How do i fix it?

Код:
if( newkeys == KEY_SECONDARY_ATTACK )  
{
if( IsPlayerInRangeOfPoint( playerid, 3.0, 1555.4877,-1675.7708,16.1953 ) ) 
{
SetPlayerPos( playerid, 246.783996,63.900199,1003.640625 ); 
SetPlayerInterior( playerid, 6 );  
SendClientMessage(playerid,WHITE,"* press ENTER to exit");
return 1; // Baigiame.
}
}
if( newkeys == KEY_SECONDARY_ATTACK ) 
{
if( IsPlayerInRangeOfPoint( playerid,3.0, 1555.4877,-1675.7708,16.1953 ) ) 
{
SetPlayerPos( playerid, 246.783996,63.900199,1003.640625 ); 
SetPlayerInterior( playerid, 0 );
return 1; 
}
}
Reply
#2

Use these codes in OnPlayerKeyStateChange(playerid, newkeys, oldkeys) callback, see the example below:
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if( newkeys == KEY_SECONDARY_ATTACK )
    {
        if( IsPlayerInRangeOfPoint( playerid, 3.0, 1555.4877,-1675.7708,16.1953 ) )
        {
            SetPlayerPos( playerid, 246.783996,63.900199,1003.640625 );
            SetPlayerInterior( playerid, 6 );
            SendClientMessage(playerid,WHITE,"* press ENTER to exit");
            return 1; // Baigiame.
        }
    }
    if( newkeys == KEY_SECONDARY_ATTACK )
    {
        if( IsPlayerInRangeOfPoint( playerid,3.0, 1555.4877,-1675.7708,16.1953 ) )
        {
            SetPlayerPos( playerid, 246.783996,63.900199,1003.640625 );
            SetPlayerInterior( playerid, 0 );
            return 1;
        }
    }
    return 1;
}
Reply
#3

Oh man i didn't used this thing at all! Forgot
But then i put it in i get a lot of different errors from data/menu.txt

--------------------------------------------------------------------
Oh i figured it out.
Thanks for the help
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)