Jump to content
  • 0

Cum sa iau un obiect.


Umbra

Question

5 answers to this question

Recommended Posts

  • 0

Creezi variabila pentru obiecte

New object[10]

La ongamemodeinit sau unde doresti creezi obiectele

Object[0]=createdynamicobject ... ... ...

Object[1]=... ...

La un timer de o secunda recomandat adaugi

 

For(new i;i<sizeof(object);i++)

Get dynamic object pos object  X Y z

If isplayerinrangeofpoint playerid 2, X Y z

Destroy dynamic object object

Send client message ....

 

Te descurci si tu cu paranteze parametrii alea alea.

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

  • 0

Hai sa iti dau un exemplu...

definesti 

new test;

dar nu uita sa faci 

test = 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)

te duci la onplayerpickupdynamicpickup si faci asa

if(pickupid == test)

{

GivePlayerWeaponEx(playerid, 24, 100);

SCM(playerid, -1, "Ai primit un deagle cu 100 gloante");

DestroyPickup(test);

}

si ar trebui sa iti mearga

Edited by AlexxAdv
Link to comment
Share on other sites

  • 0
25 minutes ago, AlexxAdv said:

Hai sa iti dau un exemplu...

definesti 

new test;

dar nu uita sa faci 

test = 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)

te duci la onplayerpickupdynamicpickup si faci asa

if(pickupid == test)

{

GivePlayerWeaponEx(playerid, 24, 100);

SCM(playerid, -1, "Ai primit un deagle cu 100 gloante");

DestroyPickup(test);

}

si ar trebui sa iti mearga

Si cum ar trebui sa ridici un obiect precum un pickup?  daca tu ai facut asa test = CreateDynamicObject atunci nu iti va merge if(pickupid == test) de la onplayerpickupdynamicpickup, ar trebui sa faci test = CreateDynamicPickup sau daca nu vrei cu pickup cum a zis el cu obiect faci cum am zis eu mai sus cu timer de o secunda sa verifice daca e langa obiect si sa il distruga

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

  • 0
Acum 2 ore, Mister a spus:

Creezi variabila pentru obiecte

New object[10]

La ongamemodeinit sau unde doresti creezi obiectele

Object[0]=createdynamicobject ... ... ...

Object[1]=... ...

La un timer de o secunda recomandat adaugi

 

For(new i;i<sizeof(object);i++)

Get dynamic object pos object  X Y z

If isplayerinrangeofpoint playerid 2, X Y z

Destroy dynamic object object

Send client message ....

 

Te descurci si tu cu paranteze parametrii alea alea.

mersi.

Link to comment
Share on other sites

  • 0
6 hours ago, Mister said:

Si cum ar trebui sa ridici un obiect precum un pickup?  daca tu ai facut asa test = CreateDynamicObject atunci nu iti va merge if(pickupid == test) de la onplayerpickupdynamicpickup, ar trebui sa faci test = CreateDynamicPickup sau daca nu vrei cu pickup cum a zis el cu obiect faci cum am zis eu mai sus cu timer de o secunda sa verifice daca e langa obiect si sa il distruga

Da era CreateDynamicPickup scz :))) orice om se mai incurca

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
Answer this question...

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