OnPlayerRequestClass
#1

Hi I've making this for classes gametext! but It's not work!

PHP код:
public OnPlayerRequestClass(playeridclassid)
{
    if(
classid == 0)
    {
        if(
gTeam[playerid] == FBII(GetPlayerSkin(playerid)))
        {
            
GameTextForPlayer(playerid,"~B~F.B.I",3000,5); // This will show up an Text , when you select your class
            
return 1;
        }
    }
    else if(
classid == 1)
    {
        if(
gTeam[playerid] == Army(GetPlayerSkin(playerid)))
        {
            
GameTextForPlayer(playerid,"~p~A.R.M.Y",3000,5);
            return 
1;
        }
    }
    return 
1;

This message showing for ALL Classes!! I just want for F.B.I + Army

PHP код:
stock FBII(skinid)
{
    switch(
skinid)
    {
        case 
286: return 1;
        default: return 
0;
    }
    return 
1;
}
stock Army(skinid)
{
    switch(
skinid)
    {
        case 
287: return 1;
        default: return 
0;
    }
    return 
1;

Reply
#2

soooooooooooooooooo
Reply
#3

24 hour bumps only, as per the forum rules you agreed that you understood when you signed up.


Why are you using the classid, then using the gTeam?

If it's spawn selection, then the players team should almost not be set because if they're in the select screen, and someone else uses team chat, the person who is in the selection will likely see it if you don't check correctly.


Just use the classids alone, as it is for selection, nothing else. gTeam and anything player specific should be set after they select to spawn.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)