Server question for job details
#1

Hello i have 4 jobs in my Server.How can i make example Job3 to be only for 7 level players and more?

pawn Код:
if (strcmp("/sweep", cmdtext, true, 10) == 0)
    {
        if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 574)
        {
            sweeper[playerid] = 1;
            SetPlayerColor(playerid, COLOR_JOB);
            ToggleEngine(carsweeper[1], VEHICLE_PARAMS_ON);
            ToggleEngine(carsweeper[2], VEHICLE_PARAMS_ON);
            ToggleEngine(carsweeper[3], VEHICLE_PARAMS_ON);
            SetPlayerCheckpoint(playerid, SweeperCheckPoint1, 3.0);
            new string[18];
            format(string, sizeof(string), "You startet Sweeper Job");
            GameTextForPlayer(playerid, string, 3000, 1);
            format(string, sizeof(string), "Sweeper: You start like sweeper.....");
            SendClientMessage(playerid, COLOR_ORANGE, string);
            return 1;
        } else {
        SendClientMessage(playerid, COLOR_GRAD1,"You must entry in sweeper..!");
        }

    return 1;
    }
Reply
#2

Try this also set pLevel to whatever your Level save is within your script.
pawn Код:
Sweeper[playerid] = 1;
PlayerInfo[playerid][pLevel] = 7;
Reply
#3

Quote:
Originally Posted by rebelgaming
Посмотреть сообщение
Try this also set pLevel to whatever your Level save is within your script.
pawn Код:
Sweeper[playerid] = 1;
PlayerInfo[playerid][pLevel] = 7;
Yeah but man , Add a SendClientMessage That you cant do these from that level , You should be 7+...
Reply
#4

Quote:
Originally Posted by yaron0600
Посмотреть сообщение
Yeah but man , Add a SendClientMessage That you cant do these from that level , You should be 7+...
Sorry I posted the wrong code my mind is slipping with old age lol.
pawn Код:
if (strcmp("/sweep", cmdtext, true, 10) == 0)
    {
       if(PlayerInfo[playerid][pLevel] >= 7)
       {
         if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 574)
         {
            sweeper[playerid] = 1;
            SetPlayerColor(playerid, COLOR_JOB);
            ToggleEngine(carsweeper[1], VEHICLE_PARAMS_ON);
            ToggleEngine(carsweeper[2], VEHICLE_PARAMS_ON);
            ToggleEngine(carsweeper[3], VEHICLE_PARAMS_ON);
            SetPlayerCheckpoint(playerid, SweeperCheckPoint1, 3.0);
            new string[18];
            format(string, sizeof(string), "You startet Sweeper Job");
            GameTextForPlayer(playerid, string, 3000, 1);
            format(string, sizeof(string), "Sweeper: You start like sweeper.....");
            SendClientMessage(playerid, COLOR_ORANGE, string);
            return 1;
        } else {
        SendClientMessage(playerid, COLOR_GRAD1,"You must entry in sweeper..!");
        SendClientMessage(playerid, COLOR_GRAD1,"You must be level 7 to use this job!");
        }

    return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)