In order to do that you must know the following:
the classid
OR
the skinid
skinid = The ID of the skin.
classid = The numer of the class, for example if I did this:
AddPlayerClass(73,...);
AddPlayerClass(75,...);
'... stands for cordinates weapons etc... not required for this example
And 75 is a skin of a policeman (it is not, it's just an example), then the classid is 2, and the skin id is 75.
so now that you know what is each, do the following:
in the public OnPlayerRequestClass(playerid,classid)
if you want to work with classid:
pawn Код:
switch(classid)
{
case 0..3: {
GameTextForPlayer(playerid, "grove", 1000, 5);
}
case 10..17: {
GameTextForPlayer(playerid, "ballas", 1000, 5);
}
case 18..20: {
GameTextForPlayer(playerid, "Police", 1000, 5);
}
}
This code means:
if the class id is from 0 to 3 (0 or 1 or 2 or 3) then write "Grove"
if the class is from 10 to 17 (10 or 11 or 12 or 13 and so on) then write Ballas...
same thing with 18..20
if you want to go by Skinid then do the following:
pawn Код:
new skinid = GetPlayerSkin(playerid);
switch(skinid)
{
case 0,5,4,3: {
GameTextForPlayer(playerid, "abc", 1000, 5);
}
case 8,2,8,9: {
GameTextForPlayer(playerid, "efg", 1000, 5);
}
case 25,78,92: {
GameTextForPlayer(playerid, "hijk", 1000, 5);
}
case 18,54,21: {
GameTextForPlayer(playerid, "lmnop", 1000, 5)
}
}
This means that if the skinid of the player is 0 or 5 or 4 or 3 then write "abc" and so on...
hope you understood, good luck.