Jump to content

[TUTORIAL] OnPlayerShootDynamicObject


Shad0wdpbgd

Recommended Posts

Salutare, am vazut ca multi au probleme cu aceasta functie, si o sa incerc sa va ajut.

Bun, sa zicem ca vrem sa facem un job de Hunter.

Mergem undeva in gamemode (nu conteaza dar recomand mai sus)

Mergem la ongamemodeinit sau unde vreti voi sa creati obiectul si punem asta:

caprioara = CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_OBJECT_SD, Float:drawdistance = STREAMER_OBJECT_DD, STREAMER_TAG_AREA areaid = STREAMER_TAG_AREA -1, priority = 0)

Acum adaugam functia:

public OnPlayerShootDynamicObject(playerid, weaponid, objectid, Float:x, Float:y, Float:z) { if(caprioara == objectid) { SendClientMessage(playerid, -1, "Test."); } }

ATENTIE! AVETI NEVOIE DE STERAMER!

Stiu ca nu a fost tocmai un tutorial reusit dar mna..

Link to comment
Share on other sites

Nustiu cum sa zic, si nu vreau sa te supar, dar nu ai definit tot necesarul in 

OnPlayerShootDynamicObject(playerid, weaponid, objectid, Float:x, Float:y, Float:z) { if(caprioara == objectid) { SendClientMessage(playerid, -1, "Test."); } }

:D

 

 

Edited by Khain Developer
Link to comment
Share on other sites

  • 3 months later...
On 1/20/2021 at 12:20 PM, hanako said:

ok, si ce ai demonstrat aici?

macar daca faci un tutorial, fa-l de la 0 si nu mai copia dintr-un gamemode si pune aici pe forum.

de unde ai scos-o si pe asta ca am copiat de undeva?

Edited by Shad0wdpbgd
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.

×
×
  • 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.