PDA

View Full Version : [HELP]adding screentext to class


DaRkAnGeL[NBK]
06/10/2011, 08:13 PM
Hey i am currently working away on a new tdm filterscript and need help with the class selection screen firstly how do i send a player to the class selection screen in the filterscript not gamemode also how do i add screentext to the class's them selfs ?

AddPlayerClass(165,365.8573,204.6503,1008.3828,3.5 167,0,0,0,0,0,0); // armyclass
AddPlayerClass(166,366.8469,209.6538,1008.3828,3.5 167,0,0,0,0,0,0); // armyclass
AddPlayerClass(287,358.7400,215.2762,1008.3828,90. 3108,0,0,0,0,0,0); // armyclass
AddPlayerClass(286,352.0650,206.2668,1008.3828,170 .8383,0,0,0,0,0,0); // armyclass
AddPlayerClass(285,356.9723,196.9246,1008.3828,257 .0058,0,0,0,0,0,0); // armyclass
AddPlayerClass(284,363.8496,197.5116,1008.3828,257 .0058,0,0,0,0,0,0); // armyclass
on that lot i would like the text to be ARMY in green so using this GameTextForPlayer(playerid, "~g~ARMY", 3000, 6);
AddPlayerClass(124,364.4113,154.8074,1025.7891,190 .3354,0,0,0,0,0,0); // terroistclass
AddPlayerClass(125,362.2712,164.4167,1025.7891,11. 7337,0,0,0,0,0,0); // terroistclass
AddPlayerClass(126,362.9535,167.1998,1025.7964,11. 7337,0,0,0,0,0,0); // terroistclass
AddPlayerClass(127,353.4784,155.5146,1025.7964,142 .7082,0,0,0,0,0,0); // terroistclass
AddPlayerClass(111,346.5766,163.0854,1025.7891,75. 0276,0,0,0,0,0,0); // terroistclass
AddPlayerClass(112,354.3102,168.6154,1025.7964,3.9 003,0,0,0,0,0,0); // terroistclass
on that lot i would like the text in red as terriost so code would be
GameTextforPlayer(playerid,"~r~Terrorist",3000,6); but i dont know how to add them all together please help :D thanks

Fj0rtizFredde
06/10/2011, 08:30 PM
Do something like this:

public OnPlayerRequestClass(playerid, classid)
{
switch(GetPlayerSkin(playerid))
{
case 165,166,287,286,285,284: GameTextForPlayer(playerid,"~g~ARMY",3000,6);
case 124,125,126,127,111,112: GameTextForPlayer(playerid,"~r~Not Terrorist",3000,6);
}
return 1;
}

I know you can use .. to but I did leave it out this time. :p

DaRkAnGeL[NBK]
06/10/2011, 08:58 PM
thank you very much it worked :D