[AJUDA] ERROS 26
#2

so vou ajudar em um pk depois alguns so vendo o script a funзгo do ke tem de fazer e assum...

pawn Код:
forward ProxDetector(Float:radi, playerid, StringCf[],col1,col2,col3,col4,col5);
forward ProxDetectorS(Float:radi, playerid, targetid);
pawn Код:
public ProxDetectorS(Float:radi, playerid, targetid)
{
    if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
    {
        new Float:posx, Float:posy, Float:posz;
        new Float:oldposx, Float:oldposy, Float:oldposz;
        new Float:tempposx, Float:tempposy, Float:tempposz;
        GetPlayerPos(playerid, oldposx, oldposy, oldposz);
        //radi = 2.0; //Trigger Radius
        GetPlayerPos(targetid, posx, posy, posz);
        tempposx = (oldposx -posx);
        tempposy = (oldposy -posy);
        tempposz = (oldposz -posz);
        //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
        if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
        {
            return 1;
        }
    }
    return 0;
}
pawn Код:
public PlayerToPoint(Float:radi, playerid, Float:xx, Float:yy, Float:zz)
{
    if(IsPlayerConnected(playerid))
    {
        new Float:oldposx, Float:oldposy, Float:oldposz;
        new Float:tempposx, Float:tempposy, Float:tempposz;
        GetPlayerPos(playerid, oldposx, oldposy, oldposz);
        tempposx = (oldposx -xx);
        tempposy = (oldposy -yy);
        tempposz = (oldposz -zz);
        if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
        {
            return 1;
        }
    }
    return 0;
}
Reply


Messages In This Thread
[AJUDA] ERROS 26 - by cabelo - 09.03.2010, 16:01
Re: [AJUDA] ERROS 26 - by SlashPT - 09.03.2010, 16:05
Re: [AJUDA] ERROS 26 - by cabelo - 09.03.2010, 16:12
Re: [AJUDA] ERROS 26 - by SlashPT - 09.03.2010, 16:22
Re: [AJUDA] ERROS 26 - by cabelo - 09.03.2010, 16:28
Re: [AJUDA] ERROS 26 - by SlashPT - 09.03.2010, 16:36
Re: [AJUDA] ERROS 26 - by cabelo - 09.03.2010, 16:41
Re: [AJUDA] ERROS 26 - by cabelo - 09.03.2010, 17:04
Re: [AJUDA] ERROS 26 - by [SK]Mulek - 09.03.2010, 21:19

Forum Jump:


Users browsing this thread: 1 Guest(s)