SA-MP Forums Archive
OnPlayerUpdate HELP ( not Worlking for me, only these two things ) - 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: OnPlayerUpdate HELP ( not Worlking for me, only these two things ) (/showthread.php?tid=346075)



OnPlayerUpdate HELP ( not Worlking for me, only these two things ) - Aira - 27.05.2012

Here's my code
What i'm trying to do is if someone approaches that Coordinates and is 100 Meters / W/e from that location, it will send a message and IF he is 70 Meters / w/e from that location it will start to send some Explotion to him
pawn Код:
public OnPlayerUpdate(playerid)
{
    if(IsPlayerInRangeOfPoint(playerid, 100, 422.130493,-2235.775146,20.270313))
    {
        if(!GetPVarInt(playerid,"halmooreuno"))
        {
            if(flakauto==1)
            {
                SetPVarInt(playerid,"halmooreuno",1);
                if(PlayerInfo[playerid][pMember] == 131|| PlayerInfo[playerid][pLeader] == 131)
                {

                }
                else
                {
                SendClientMessage(playerid, COLOR_RED, "Message");
                }
                }
            else
            {
            }
        }
    }
    if(IsPlayerInRangeOfPoint(playerid, 70, 422.130493,-2235.775146,20.270313))
    {
        if(!GetPVarInt(playerid,"halmoore"))
            {
            new Float:x, Float:y, Float:z;
            if(flakauto==1)
            {
                SetPVarInt(playerid,"halmoore",1);
                if(PlayerInfo[playerid][pMember] == 131|| PlayerInfo[playerid][pLeader] == 131)
                {

                }
                else
                {
                SendClientMessage(playerid, COLOR_RED, "Nessage");
                GetPlayerPos(playerid, x, y, z);
                CreateExplosion(x, y , z, 7, 2);
                }
            }
            else
            {
            }
        }
    }
        return 1;
}



Re: OnPlayerUpdate HELP ( not Worlking for me, only these two things ) - Aira - 27.05.2012

Bump


Re: OnPlayerUpdate HELP ( not Worlking for me, only these two things ) - MP2 - 27.05.2012

Don't bump topics until 48 hours have passed.