Returning multiple values in one funcion - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Returning multiple values in one funcion (
/showthread.php?tid=136729)
Returning multiple values in one funcion -
pagie1111 - 26.03.2010
I need this funciton to retun two integers.
stock GetPlayerAllRanks(playerid,&police,&swat)
&police will return pRank[playerid][p_police_rank];
&swat will return pRank[playerid][p_swat_rank];
Thanks
Re: Returning multiple values in one funcion -
wafffllesss - 26.03.2010
pawn Код:
stock GetPlayerAllRanks(playerid,&police,&swat){
police = pRank[playerid][p_police_rank];
swat = pRank[playerid][p_swat_rank];
return true;
}
// usage:
new police_rank,swat_rank;
GetPlayerAllRanks(playerid,police_rank,swat_rank);
if(police_rank == 3){
...
}