text under player - 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: text under player (
/showthread.php?tid=125757)
text under player -
$$ Matej8700 $$ - 05.02.2010
well i have one question

how i make that when i am in player class
to choose player that above player will be text like ATTACKER OR LETS SAY DEFENDER
how i make that will be text above player
where need to put line in pawno and what to type
*thanks,Matej8700
Re: text under player -
LuxurioN™ - 05.02.2010
Basic exemple: (Not Tested)
pawn Код:
public OnPlayerRequestClass(playerid,classid)
{
if(classid==0){
GameTextForPlayer(playerid,"~r~Attacker",1000,3);
}
else if(classid==1){
GameTextForPlayer(playerid,"~g~Defender",1000,3);
}
}
return 1;
}
Re: text under player -
hvampire - 05.02.2010
here is an example :
Put this in : onplayerrequestclass
Код:
switch (classid)
{
case 0:
{
GameTextForPlayer(playerid, "~g~MAFIA", 1000, 3);
SetPlayerColor(playerid,COLOR_GREEN);
gTeam[playerid] = TEAM_MAFIA;
}
case 1:
{
GameTextForPlayer(playerid, "~Y~GANG", 1000, 3);
SetPlayerColor(playerid,COLOR_YELLOW);
gTeam[playerid] = TEAM_GANG;
}
}
Re: text under player -
CrucixTM - 05.02.2010
I had same problem, no help and I couldn't find it anywhere - So now I'll save you the trouble mate:
Code:
Код:
if(classid == 0) {
GameTextForPlayer(playerid,"~n~~n~~n~~n~~b~POLICE~n~~w~Cop",6000,5);
} else if(classid == 1) {
GameTextForPlayer(playerid,"~n~~n~~n~~n~~b~BALLAS~n~~w~Gangster",6000,5);
This shows the classes Team (POLICE or BALLAS in this case) and the specific class name underneath their team name, in the bottom of the screen(just above the [<< >> Spawn] panel)
Stays for 6 seconds. Edit 6000 to how many seconds you want(in miliseconds)
Classids: The first class you added (the one on top of the AddPlayerClass list) is classid 0. The next one is classid 1, then 2, 3, 4 and so on. Add this code under 'public OnPlayerRequestClass(playerid, classid)'.
There you go mate