Will that function work? - 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: Will that function work? (
/showthread.php?tid=450848)
Will that function work? -
Magic_Time - 14.07.2013
Hi I don't know if it will work:
PHP код:
stock GetPlayerTeamm(playerid)
{
return PlayerInfo[playerid][pTeam];
}
Re: Will that function work? -
MP2 - 14.07.2013
Try it?
You should use a macro though:
#define GetPlayerTeam(%0) PlayerInfo[%0][pTeam]
Re: Will that function work? -
Jstylezzz - 14.07.2013
This stock will return the value of PlayerInfo[playerid][pTeam];
So, if you do
pawn Код:
printf("Team value of playerid %d is %d",playerid,GetPlayerTeam(playerid));
It will print the value of PlayerInfo[playerid][pTeam];
Re: Will that function work? -
ReVo_ - 14.07.2013
Yes, will work.
But use PlayerInfo[playerid][pTeam] directly is better.