SA-MP Forums Archive
return function. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: return function. (/showthread.php?tid=426793)



return function. - -CyRAX - 30.03.2013

-------------------


Re: return function. - -CyRAX - 30.03.2013

Any can help me ?


Re: return function. - RajatPawar - 30.03.2013

What is it that you require? Please explain more !
EDIT: I guess he needs a stock which returns true/false depending on if the player is in a certain team or not.
If that is it, it's like:

pawn Код:
stock IsPlayerInTeam( playerid, teamid )
{
     if ( GetPlayerTeam( playerid ) == teamid ) return true;
     else return false;
}
This uses GetPlayerTeam And SetPlayerTeam which hardly anyone uses. If you use custom teams, specify them here.


Re: return function. - Konstantinos - 30.03.2013

Neither do I understand what he wants to do. Explain in details, please.


Re: return function. - -CyRAX - 30.03.2013

I use instead of return 1; function return (true);

I can ?


Re: return function. - Konstantinos - 30.03.2013

Actually, they're same.
pawn Код:
return 1;
return true;
return (1);
return (true); // never tried that, but it should work.
Just try it out, if the compiler doesn't give you anything, then it's fine.


Re: return function. - -CyRAX - 30.03.2013

Thanks for replay Dwane