KEY_YES doesn't work properly? [+Rep]
#1

Hey guys,
I'm trying to make script which basically means that when a player clicks on Y it does the following
PHP код:
if(IsPlayerInSphere(playerid, 1528.4960,117.3113,17.3281, 15) && (newkeys & KEY_YES)) // LEAD
{
GivePlayerMoneyEx(playerid, -5000);
ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.1, 1, 1, 1,0,0,1);
new 
myobject = CreateDynamicObject(1271, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
AttachObjectToPlayer(myobject, playerid, 1.5, 0.5, 0.0, 0.0, 1.5, 2);
    if(
GetTickCount() - PlayerTemp[playerid][cmdtick] < 4000) return SendClientWarning(playerid, "You may use this feature only once in each 4 seconds."); 
but nothing happens as I click it, seems like it doesn't detect the key for some reason..
Reply
#2

PHP код:
if(newkeys == KEY_YES) 
Reply
#3

DON'T do what MicroKyrr said, that answer makes no sense.

What you need to do right now is add prints all over so you can track what's going on.

ex.
pawn Код:
ONKSC{
    print("OPKSC Called");
    if(newkeys & KEY_YES) {
        print("KEY_YES is in newkeys.");
        if(Is in sphere)
            print("player is in sphere");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)