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(playerid1528.4960,117.3113,17.328115) && (newkeys KEY_YES)) // LEAD
{
GivePlayerMoneyEx(playerid, -5000);
ApplyAnimation(playerid"CARRY""crry_prtial"4.1111,0,0,1);
new 
myobject CreateDynamicObject(12710.00.00.00.00.00.0);
AttachObjectToPlayer(myobjectplayerid1.50.50.00.01.52);
    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)