SA-MP Forums Archive
Help alittle. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help alittle. (/showthread.php?tid=376561)



Help alittle. - Eugene. - 10.09.2012

Problem. Well. The Animation of opening the door is going on evertime when I press 'enter' and everywhere. Doesn't matter if you are far away from the door. What I did wrong ?

Codes
Код:
    if(newkeys & KEY_SECONDARY_ATTACK)
    {
        if(IsPlayerInRangeOfPoint(playerid, 2.0, 1293.5813,-1020.5617,1085.9760))
        if(!IsACop(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an SAPD Officer.");
        ApplyAnimation(playerid, "HEIST9", "Use_SwipeCard", 4.0, 0, 0, 0, 0, 0);
        {
            if(pddoor1opened == false)
            {
                MoveDynamicObject(pddoor1, 1294.01, -1021.09, 1084.99, 0.50);
                pddoor1opened = true;
                return 1;
            }
            else
            {
                MoveDynamicObject(pddoor1, 1292.85, -1021.09, 1084.99, 0.50);
                pddoor1opened = false;
        	   	return 1;
            }
        }

	}



Re: Help alittle. - mobiliz - 10.09.2012

like
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1293.5813,-1020.5617,1085.9760))
    {
    if(newkeys & KEY_SECONDARY_ATTACK)
    {
        if(!IsACop(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an SAPD Officer.");
        ApplyAnimation(playerid, "HEIST9", "Use_SwipeCard", 4.0, 0, 0, 0, 0, 0);
        {
            if(pddoor1opened == false)
            {
                MoveDynamicObject(pddoor1, 1294.01, -1021.09, 1084.99, 0.50);
                pddoor1opened = true;
                return 1;
            }
            else
            {
                MoveDynamicObject(pddoor1, 1292.85, -1021.09, 1084.99, 0.50);
                pddoor1opened = false;
                return 1;
            }
        }

    }
}



Re: Help alittle. - CROSS_Hunter - 10.09.2012

Quote:
Originally Posted by mobiliz
Посмотреть сообщение
like
pawn Код:
if(IsPlayerInRangeOfPoint(playerid, 2.0, 1293.5813,-1020.5617,1085.9760))
    {
    if(newkeys & KEY_SECONDARY_ATTACK)
    {
        if(!IsACop(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an SAPD Officer.");
        ApplyAnimation(playerid, "HEIST9", "Use_SwipeCard", 4.0, 0, 0, 0, 0, 0);
        {
            if(pddoor1opened == false)
            {
                MoveDynamicObject(pddoor1, 1294.01, -1021.09, 1084.99, 0.50);
                pddoor1opened = true;
                return 1;
            }
            else
            {
                MoveDynamicObject(pddoor1, 1292.85, -1021.09, 1084.99, 0.50);
                pddoor1opened = false;
                return 1;
            }
        }

    }
}
Dude! thats totally a wrong way! it wont fix a shit


Re: Help alittle. - CROSS_Hunter - 10.09.2012

pawn Код:
if(newkeys & KEY_SECONDARY_ATTACK && IsPlayerInRangeOfPoint(playerid, 2.0, 1293.5813,-1020.5617,1085.9760))
    {
        if(!IsACop(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an SAPD Officer.");
        {
            if(pddoor1opened == false)
            {
                MoveDynamicObject(pddoor1, 1294.01, -1021.09, 1084.99, 0.50);
                pddoor1opened = true;
                ApplyAnimation(playerid, "HEIST9", "Use_SwipeCard", 4.0, 0, 0, 0, 0, 0);
                return 1;
            }
            else
            {
                MoveDynamicObject(pddoor1, 1292.85, -1021.09, 1084.99, 0.50);
                pddoor1opened = false;
                ClearAnimations(playerid);
                return 1;
            }
        }

    }
EDIT: Sorry for double posting


Re: Help alittle. - mobiliz - 10.09.2012

Quote:
Originally Posted by CROSS_Hunter
Посмотреть сообщение
Dude! thats totally a wrong way! it wont fix a shit
Sorry for being a noob then.

+ don't double post you should use the edit button.