Problem in detecting if a portion of the screen is being clicked by the mouse.
#1

I used this kind of code.
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if ((newkeys & KEY_FIRE) && !(oldkeys & KEY_FIRE))
    {
        new Float:x, Float:y, Float:z;
        GetPlayerCameraPos(playerid,x, y, z);
        if( (x<392 || x>358) && (y>152 || y<182) ) //Checking for the textdraw area
        {
            SendClientMessage(playerid, -1, "Done."); //For testing
        }
    }
    return 1;
}
I tried it ingame, didn't work!
Please do help.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)