help KEY_ENTER ERROR HOW to define it?
#1

this my code
PHP код:
if(PRESSED(KEY_ENTER))
    {
        if(
IsPlayerInRangeOfPoint(playerid2.01928.7715, -1776.262113.5469))
        {
             
SendClientMessage(playeridCOLOR_GREY"**GAS STATION**");
            
SendClientMessage(playeridCOLOR_GREY"Welcome to the Gas Station! Please go by the counter to buy something.");
            
SetPlayerPos(playerid, -25.5497,-183.2443,1003.5469);
            
SetPlayerInterior(playerid,17);
            return 
1;
    }
}
    return 
1;

and this error please help i want press enter for this code

PHP код:
C:\Users\Yajaira\Desktop\CNR\gamemodes\1.2.pwn(1949) : error 017undefined symbol "KEY_ENTER"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
1 Error

Reply
#2

It's KEY_SECONDARY_ATTACK.
https://sampwiki.blast.hk/wiki/Keys
Reply
#3

Quote:
Originally Posted by [XST]O_x
Посмотреть сообщение
It's KEY_SECONDARY_ATTACK.
https://sampwiki.blast.hk/wiki/Keys
it dint work

whats the code like when i go i n the game and i press a key ill let me know they key id in the black box?

i know it haves something like
getplayerkeys
then print,"key %i idk
Reply
#4

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    new string[32];
    format(string, sizeof string, "You have pressed KEY %d", newkeys);
    SendClientMessage(playerid, -1, string);
    return 1;
}
Press enter and see what it prints. I bet it'll print 16.
Reply
#5

Quote:
Originally Posted by [XST]O_x
Посмотреть сообщение
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    new string[32];
    format(string, sizeof string, "You have pressed KEY %d", newkeys);
    SendClientMessage(playerid, -1, string);
    return 1;
}
Press enter and see what it prints. I bet it'll print 16.
Thanks alot!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)