Proper arrangement
#1

Hello, I was wondering is this the right arrangement i set it? Because when i was in game both of this can't use it? Please help.

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if(GetPVarInt(playerid, "Injured") != 0)
	{
     	if(!gPlayerUsingLoopingAnim[playerid])
     	{
    	    if(PRESSED(KEY_SPRINT))
     	    {
        	    ClearAnimations(playerid);
        	    SetPlayerSkin(playerid, GetPlayerSkin(playerid));
             	SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
            	StopLoopingAnim(playerid);
            }
            return 1;
		}
        if(takingselfie[playerid] == 1)
        {
            if(PRESSED(KEY_YES))
            {
                GetPlayerPos(playerid,lX[playerid],lY[playerid],lZ[playerid]);
                static Float: n1X, Float: n1Y;
                if(Degree[playerid] >= 360) Degree[playerid] = 0;
                Degree[playerid] += Speed;
                n1X = lX[playerid] + Radius * floatcos(Degree[playerid], degrees);
                n1Y = lY[playerid] + Radius * floatsin(Degree[playerid], degrees);
                SetPlayerCameraPos(playerid, n1X, n1Y, lZ[playerid] + Height);
                SetPlayerCameraLookAt(playerid, lX[playerid], lY[playerid], lZ[playerid]+1);
                SetPlayerFacingAngle(playerid, Degree[playerid] - 90.0);
            }
            if(PRESSED(KEY_NO))
            {
                GetPlayerPos(playerid,lX[playerid],lY[playerid],lZ[playerid]);
                static Float: n1X, Float: n1Y;
                if(Degree[playerid] >= 360) Degree[playerid] = 0;
                Degree[playerid] -= Speed;
                n1X = lX[playerid] + Radius * floatcos(Degree[playerid], degrees);
                n1Y = lY[playerid] + Radius * floatsin(Degree[playerid], degrees);
                SetPlayerCameraPos(playerid, n1X, n1Y, lZ[playerid] + Height);
                SetPlayerCameraLookAt(playerid, lX[playerid], lY[playerid], lZ[playerid]+1);
                SetPlayerFacingAngle(playerid, Degree[playerid] - 90.0);
    		}
    		return 1;
		}
	}
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: