SA-MP Forums Archive
Server question for job details - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Server question for job details (/showthread.php?tid=436382)



Server question for job details - Yordan_Kronos - 11.05.2013

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;
    }



Re: Server question for job details - rebelgaming - 11.05.2013

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



Re: Server question for job details - yaron0600 - 11.05.2013

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+...


Re: Server question for job details - rebelgaming - 11.05.2013

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;
    }