Jump to content

IsPlayerInRangeOfPoint


Gireada

Recommended Posts

Va voi explica cum sa folositi aceasta functie.

IsPlayerInRangeOfPoint este o fuctie care verifica daca un jucator este in apropiere de un punct.

Parametrii functiei:

IsPlayerInRangeOfPoint(id jucaotr, distanta dintre punct si tine, coordonata punctx, coordonata puncty, coordonata punctz)

Pentru a afla coordonatele unui punct trebuie sa urmati urmatorul tutorial: click

Aceasta functie este mult mai buna decat functia PlayerToPoint deoarece IsPlayerInRangeOfPoint a fost creeata de Developerii SAMP.

Exemple unde le poti folosi:

1. La o comanda

[pawn]CMD:comanda(playerid, params[])

{

    if(IsPlayerInRangeOfPoint(playerid, 7.0, coordx,coordy, coordz))

    {

      //ce face comanda

    }

    return 1;

}[/pawn]

2.La un CallBack

[pawn]public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)

{

if (newkeys & KEY_SECONDARY_ATTACK)

{

//ce anume face

}

return 1;

}[/pawn]

Tutorial pentru crazyzee care nu stie sa schimbe o coordonata, si se baga sa editeze un gamemode

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.