[Help] OnPlayerRequestclass
#1

Hey guys, how can i make it so that last team, gTeam 6 is only for special people that have PlayerInvite = 1 and for people who got playerinvite = 0 it wont appear?

PHP код:
public OnPlayerRequestClass(playeridclassid)
{
    new 
string[32];
    
SetPlayerInterior(playerid,3);
    
SetPlayerPos(playerid,-2654.4,1424.2,912.4);
    
SetPlayerFacingAngle(playerid90.0);
    
SetPlayerCameraPos(playerid,-2654.4-1.5,1424.2,912.4+0.7);
    
SetPlayerCameraLookAt(playerid,-2654.4,1424.2,912.4+0.7);
    
    if (
classid >= && classid <= 5)
    {
        
format(stringsizeof(string), "~g~Grove Street.");
        
GameTextForPlayer(playeridstring30004);
        
gTeam[playerid] = 1
    }
    else if (
classid >= && classid <= 11)
    {
        
format(stringsizeof(string), "~p~Los Santos Ballas.");
        
GameTextForPlayer(playeridstring30004);
        
gTeam[playerid] = 2;
    }
    else if (
classid >= 12 && classid <= 17)
    {
        
format(stringsizeof(string), "~b~Los Aztecas.");
        
GameTextForPlayer(playeridstring30004);
        
gTeam[playerid] = 3;
    }
    else if (
classid >= 18 && classid <= 23)
    {
        
format(stringsizeof(string), "~y~Los Santos Vagos.");
        
GameTextForPlayer(playeridstring30004);
        
gTeam[playerid] = 4;
    }
    else if (
classid >= 24 && classid <= 26)
    {
        
gTeam[playerid] = 5;
        
format(stringsizeof(string), "~r~Bikers.");
        
GameTextForPlayer(playeridstring30004);
    }
    else if (
classid >= 27 && classid <= 29)
    {
        
gTeam[playerid] = 6;
        
format(stringsizeof(string), "~w~Public Services.");
        
GameTextForPlayer(playeridstring30004);
    }
    
PlayerInfo[playerid][pModel] = Skins[classid][0];
    return 
1;

Reply
#2

anyone
Reply
#3

pawn Код:
public OnPlayerRequestSpawn(playerid)
{
    if(gTeam[playerid] == 6)
    {
        if(PlayerInvite = 1)
        {
            return 1;
        }
        else
        {
            return 0;
        }  
    }      
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)