Problem
#1

Hello there everyonie i am trying to make onplayerstatchange i made one where i an press sprint so i can enter a building but now when i go in build i made a next code to make me exit the building but it wont work please help here the code
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
        if ((oldkeys & KEY_SPRINT) && !(newkeys & KEY_SPRINT))
        {
            if(IsPlayerInRangeOfPoint(playerid, 2.0, 1553.7203,-1675.6603,16.1953)) //replace with the position where to press the alt button
            {
            SetPlayerInterior(playerid, 10);
            SetPlayerPos(playerid, 246.40,110.84,1003.22);
            }
            return 1;
        }
        if ((oldkeys & KEY_SPRINT) && !(newkeys & KEY_SPRINT))
        {
            if(IsPlayerInRangeOfPoint(playerid, 2.0, 245.6786,107.3357,1003.2188)) //replace with the position where to press the alt button
            {
            SetPlayerInterior(playerid, 0);
            SetPlayerPos(playerid, 1553.7203,-1675.6603,16.1953);
            }
            return 1;
    }
        return 0;
    }
please help fix it
Reply


Messages In This Thread
Problem - by Shelton Culmer - 21.10.2011, 13:09
Re: Problem - by MP2 - 21.10.2011, 13:27
Re: Problem - by Shelton Culmer - 21.10.2011, 13:35
Re: Problem - by [MWR]Blood - 21.10.2011, 13:36
Re: Problem - by Shelton Culmer - 21.10.2011, 13:38
Re: Problem - by SmiT - 21.10.2011, 13:39
Re: Problem - by Shelton Culmer - 21.10.2011, 13:56

Forum Jump:


Users browsing this thread: 4 Guest(s)