Checkpoint. ++rep
#6

pawn Код:
#include <a_samp>
#include <zcmd>

#define MAX_JOBS 2 // Max Jobs
#define YourJobName 1 // Your Job Name

new wJob[MAX_PLAYERS];

// Get Job command

CMD:getjob(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, RANGE, X, Y, Z)) // Replace RANGE = Distance when he can use, and X,Y,Z with your pick-up coordinates
    wJob[playerid] = 1; // 1 = YourJobName from defines !
    SendClientMessage(playerid, -1, "{FF0000}[INFO]: {15FF00}You have chose your job."); // He will get a job  !
    return 1;
}

// For making a command only for that job :

CMD:CommandName(playerid, params[])
{
    if(wJob[playerid] != 1) //Number "1" is your job name.
        return SendClientMessage(playerid, 0xAFAFAFAA, "You don't have this job"); // Get a message he haven't that job !

    SendClientMessage(playerid,-1,"Your job command Text or code"); // If he have that job
    return 1;
}

// For Quit Job (You don't have any job)

CMD:quitjob(playerid, params[])
{
    wJob[playerid] = 0; //Now you don't have any job !
    SendClientMessage(playerid,0xAFAFAFAA,"Now you're unemployed"); // Text
    return 1;
}
- You need ZCMD.

http://www.solidfiles.com/d/d20f/zcmd.inc

- Hope I helped you. A good day !
- P.S: Sorry I writed so hard, I didn't see your comments, I was working .
Reply


Messages In This Thread
Checkpoint. ++rep - by mkmk - 03.11.2014, 17:42
Re: Checkpoint. ++rep - by HY - 03.11.2014, 17:52
Re: Checkpoint. ++rep - by mkmk - 03.11.2014, 17:58
Re: Checkpoint. ++rep - by HY - 03.11.2014, 18:01
Re: Checkpoint. ++rep - by mkmk - 03.11.2014, 18:07
Re: Checkpoint. ++rep - by HY - 03.11.2014, 18:20
Re: Checkpoint. ++rep - by mkmk - 03.11.2014, 18:58
Re: Checkpoint. ++rep - by HY - 04.11.2014, 05:56

Forum Jump:


Users browsing this thread: 2 Guest(s)