SA-MP Forums Archive
showing stats help - 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: showing stats help (/showthread.php?tid=446875)



showing stats help - WardenCS - 27.06.2013

Helloo, my stats showing isnt working right, it just wont show nothing on there
defined like dat

Код:
		new iftext[128];
		if(PlayerInfo[ playerid ][ Member ] == -255) { iftext = "None"; }
		else { iftext = OrgInfo[fID][fName]; }
and showing like dat
Код:
 		format(string, sizeof(string), "Illegal Faction: %s",iftext);
		SendClientMessage(playerid, COLOR_GRAD2, string);
what wrong with that?


Re: showing stats help - park4bmx - 27.06.2013

you dont assing strings ! you need to format them !
pawn Код:
new iftext[128];
if(PlayerInfo[ playerid ][ Member ] == -255) format(iftext,sizeof iftext,"None");
else format(iftext,sizeof iftext,"%s",OrgInfo[fID][fName]);



Re: showing stats help - Vince - 27.06.2013

It is totally possible to assign a string directly, but only if it concerns a single dimensional array.
pawn Код:
iftext = "None";
is perfectly valid Pawn code and works perfectly.


Re: showing stats help - park4bmx - 27.06.2013

yes true, but adding multiple string is not possible (i think ?)