How to create callback that handle returns? -
Plovix - 24.01.2013
Title says all...How?
Re: How to create callback that handle returns? -
FUNExtreme - 24.01.2013
Simple as that
Re: How to create callback that handle returns? - Patrick - 24.01.2013
example this
pawn Код:
forward Test();
public Test()
}
return Test;
}
Re: How to create callback that handle returns? -
Plovix - 24.01.2013
Example: someone returns 0 to example callback,then server resets his money using ResetPlayerMoney function.
Can you create example callback,please?
Re: How to create callback that handle returns? - Patrick - 24.01.2013
pawn Код:
forward ResetMoney
public ResetMoney
{
//code here
return ResetPlayerMoney;
}
like this?
Re: How to create callback that handle returns? -
Plovix - 24.01.2013
Quote:
Originally Posted by pds2012
pawn Код:
forward ResetMoney public ResetMoney { //code here return ResetPlayerMoney; }
like this?
|
No.I mean to use CallLocalFunction to call.And if the scripter returns 0 then that callback resets money(for example)
Sorry for my bad english
Re: How to create callback that handle returns? -
gnoomen2 - 24.01.2013
Maybe this:
pawn Код:
forward ResetMoney(); // you may want to put "playerid" inside here.
public ResetMoney() // and here.
{
// The code that you want to start - here.
}
COMMAND:resetmoney(playerid, params[])
{
SetTimer("ResetMoney",2000,0); // Starts public ResetMoney after 2 seconds ( 2000 milliseconds) ,0 = not doing it again and again (,1 = repeat)
return 1; // don't know if it is ResetMoney or ResetMoney(playerid) we should put in the timer.
}
Re: How to create callback that handle returns? -
Plovix - 24.01.2013
Quote:
Originally Posted by gnoomen2
Maybe this:
pawn Код:
forward ResetMoney(); // you may want to put "playerid" inside here. public ResetMoney() // and here. { // The code that you want to start - here. } COMMAND:resetmoney(playerid, params[]) { SetTimer("ResetMoney",2000,0); // Starts public ResetMoney after 2 seconds ( 2000 milliseconds) ,0 = not doing it again and again (,1 = repeat) return 1; // don't know if it is ResetMoney or ResetMoney(playerid) we should put in the timer. }
|
NO!I know how to call function.Please READ my queston before answering.
For example again: If you don't return value on that created callback,then warning shows:
"MyCallback should return value"
I need ansfwer how to create callback like that.Where value must be returned.
Is there anyone who can UNDERSTAND my question!?
Re: How to create callback that handle returns? -
FUNExtreme - 24.01.2013
Quote:
Originally Posted by Plovix
NO!I know how to call function.Please READ my queston before answering.
For example again: If you don't return value on that created callback,then warning shows:
"MyCallback should return value"
I need ansfwer how to create callback like that.Where value must be returned.
Is there anyone who can UNDERSTAND my question!?
|
What you are saying makes no sense at all. You could try giving an example.
Re: How to create callback that handle returns? -
Sime30 - 24.01.2013
Plovix, daj barem reci na na naљem jeziku, moћda te tako budem razumio!