Class Selection Announcement - 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: Class Selection Announcement (
/showthread.php?tid=301663)
Class Selection Announcement -
Thresholdold - 05.12.2011
Hey,
when a player chooses a skin, how do I make the text appear on the screen using GameTextForPlayer, but I want to make it a different text for each skin, I want this appear BEFORE they spawn, not after. Like this server: 64.120.76.236:8500
Re: Class Selection Announcement -
antonio112 - 05.12.2011
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
if(classid == 0)
{
GameTextForPlayer(playerid, "This is CJ Skin", 3000, 3);
}
else if(classid == 1)
{
GameTextForPlayer(playerid, "This is Truth Skin", 3000, 3);
}
// And so on ..
return 1;
}
Re: Class Selection Announcement -
MP2 - 05.12.2011
That's not a great way to do it.
pawn Код:
new ccText[][] = {
"This is class 1",
"This is class 2",
"This is class 3"
};
public OnPlayerRequestClass(playerid, classid)
{
GameTextForPlayer(playerid, ccText[classid], 3000, 3);
}
Re: Class Selection Announcement -
antonio112 - 05.12.2011
Quote:
Originally Posted by MP2
That's not a great way to do it.
pawn Код:
new ccText[][] = { "This is class 1", "This is class 2", "This is class 3" };
public OnPlayerRequestClass(playerid, classid) { GameTextForPlayer(playerid, ccText[classid], 3000, 3); }
|
I presented him the 'newbie' way, since, I'm guessing he just started working in pawno. The thing is he needs to learn first ... If you give him your code, he'll understand nothing from it.
Re: Class Selection Announcement -
Thresholdold - 05.12.2011
no, I understand pawn :P
Re: Class Selection Announcement -
antonio112 - 05.12.2011
Yea, you sure do.