How to create callback that handle returns?
#1

Title says all...How?
Reply
#2

pawn Код:
return something;
Simple as that
Reply
#3

example this

pawn Код:
forward Test();
public Test()
}
return Test;
}
Reply
#4

Example: someone returns 0 to example callback,then server resets his money using ResetPlayerMoney function.
Can you create example callback,please?
Reply
#5

pawn Код:
forward ResetMoney
public ResetMoney
{
//code here
return ResetPlayerMoney;
}
like this?
Reply
#6

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
Reply
#7

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.
}
Reply
#8

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!?
Reply
#9

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.
Reply
#10

Plovix, daj barem reci na na naљem jeziku, moћda te tako budem razumio!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)