Score must be 100 To spawn on this Team
#3

Quote:
Originally Posted by [Cali]ChrOnic_T
Посмотреть сообщение
How to make it so. You must have 100 score to spawn as this team


pawn Код:
public OnPlayerRequestSpawn(playerid)
{  
   //==== DONT MIND THISS ==================
      new  name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    if(gTeam[playerid] == TEAM_Cali) {
        if (strfind(name, "[Cali]", true) == 0) {
            return 1;
        }
        else {
            GameTextForPlayer(playerid, "~r~You're not in (Cali)!", 3000, 5);
            ForceClassSelection(playerid);
            return 0;
        }
//==============================================

//===== this is the problem vvvvv ==============

    if(gTeam[playerid] == TEAM_SWAT)
    {
        if(GetPlayerScore(playerid) > 100)
        {
            GameTextForPlayer(playerid,"NEED 100 SCORE",3000,3);
            SendClientMessage(playerid,-1,"You need atleast 100 score to play on this team.");
            return 0;
        }
    }
    return 1;
 }
   return 1;
}
I really need this fixed cause im releasing my server 1.3 version soon
pawn Код:
public OnPlayerRequestSpawn(playerid)
{  
   //==== DONT MIND THISS ==================
      new  name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    if(gTeam[playerid] == TEAM_Cali) {
        if (strfind(name, "[Cali]", true) == 0) {
            return 1;
        }
        else {
            GameTextForPlayer(playerid, "~r~You're not in (Cali)!", 3000, 5);
            ForceClassSelection(playerid);
            return 0;
        }
//==============================================

//===== this is the problem vvvvv ==============

    if(gTeam[playerid] == TEAM_SWAT)
    {
        if(GetPlayerScore(playerid) < 100)
        {
            GameTextForPlayer(playerid,"NEED 100 SCORE",3000,3);
            SendClientMessage(playerid,-1,"You need atleast 100 score to play on this team.");
            ForceClassSelection(playerid);
            return 0;
        }
    }
    return 1;
 }
   return 1;
}
All I changed was > to < and added 'ForceClassSelection', you checked/returned the message if the player was at least score 100, now it's doing so if the player is lower then score 100.

Best regards,
Jesse
Reply


Messages In This Thread
Score must be 100 To spawn on this Team - by [Cali]ChrOnic_T - 11.06.2014, 03:16
Re : Score must be 100 To spawn on this Team - by Matnix - 11.06.2014, 03:26
Re: Score must be 100 To spawn on this Team - by jessejanssen - 11.06.2014, 03:28
Re: Re : Score must be 100 To spawn on this Team - by jessejanssen - 11.06.2014, 03:32
Re : Score must be 100 To spawn on this Team - by Matnix - 11.06.2014, 03:35
Re: Score must be 100 To spawn on this Team - by [Cali]ChrOnic_T - 11.06.2014, 03:48
Re: Score must be 100 To spawn on this Team - by Threshold - 11.06.2014, 03:53

Forum Jump:


Users browsing this thread: 1 Guest(s)