help KEY_ENTER ERROR HOW to define it? - 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)
+--- Thread: help KEY_ENTER ERROR HOW to define it? (
/showthread.php?tid=457485)
help KEY_ENTER ERROR HOW to define it? -
UserName31 - 11.08.2013
this my code
PHP код:
if(PRESSED(KEY_ENTER))
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1928.7715, -1776.2621, 13.5469))
{
SendClientMessage(playerid, COLOR_GREY, "**GAS STATION**");
SendClientMessage(playerid, COLOR_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 017: undefined symbol "KEY_ENTER"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
Re: help KEY_ENTER ERROR HOW to define it? -
[XST]O_x - 11.08.2013
It's KEY_SECONDARY_ATTACK.
https://sampwiki.blast.hk/wiki/Keys
Re: help KEY_ENTER ERROR HOW to define it? -
UserName31 - 11.08.2013
Quote:
Originally Posted by [XST]O_x
|
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
Re: help KEY_ENTER ERROR HOW to define it? -
[XST]O_x - 11.08.2013
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.
Re: help KEY_ENTER ERROR HOW to define it? -
UserName31 - 11.08.2013
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!