Vice City Multiplayer
VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: NeskWriter on January 04, 2013, 01:56:08 pm
-
I am really ashamed by posting that, but I don't understand what returns mean and what to write after return (1/0). I need someone's help, cuz I didn't find any help in internet.
Sorry :-[
-
If you want the public to return something, you use return, for example:
[pawn]public IsHeThere( playerid )
{
if( strcmp( IsHe(playerid), "Yes", 0 ) )
{
DoSomething();
}
}
public IsHe(playerid)
{
if( IsThere( playerid ) ) return "Yes";
else return "No";
}[/pawn]
-
hmm...
-
...
for example, you want to know if a player is online, so you do something like
if( IsPlayerOnline(playerid) == 1 )
You won't get 1 if there'd be no return 1;
-
...
for example, you want to know if a player is online, so you do something like
if( IsPlayerOnline(playerid) == 1 )
You won't get 1 if there'd be no return 1;
Oh thank you! Now I understand it better! yeah! 8)