AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Passing ID's (https://forums.alliedmods.net/showthread.php?t=45705)

stigma 10-09-2006 15:27

Passing ID's
 
Hey..

If i have a function with 2 id's called "killer" & "killername", How is it then posible to pass the id's to another function?

Edit: Nevermind, found out - Sorry for this post..

schnitzelmaker 10-09-2006 16:30

Re: Passing ID's
 
Code:
function_1(){  new killerid=...  new attackerid=...  function_2(killerid,attackerid) } function_2(killerid,attackerid) {  //do something wth the ids }

schnitzelmaker 10-09-2006 16:34

Re: Passing ID's
 
or
Code:
function_1(){  new killerid=...  new attackerid=...  new data[2]  data[0] = killerid  data[1] = attackerid  set_task(0.1,"function_2",12345,data,2) } function_2() {  new id_1,id_2  id_1 = read_data(1)  id_2 = read_data(2)  //do something wth the ids }

Zenith77 10-09-2006 18:56

Re: Passing ID's
 
Are you stupid? This is a serious question. Setting a task just so you can pass parameters, god I don't even have a word for it. Answer: No, just do it the way the first way.


All times are GMT -4. The time now is 04:57.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.