SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Tutorials

Thread Tools Display Modes
Old 03/01/2013, 05:55 PM   #1
Little Clucker
Join Date: Oct 2012
Posts: 49
Reputation: 5
Default Detailed Guide: Creating jobs (easy)

Hello guys, today i will be teaching you with details explaining how to make jobs

So lets get started! Lets start by defining are jobs. If you are gonna make a serious job system you must use jobless and your job. Now on to the coding. We're gonna start by
#define Jobs 2
First job is Jobless for serious job system. Second one is your job you want. But wait we need our variable for the job so lets put below
Include <a_samp>
new cJob[MAX_PLAYERS];
Okay so whats that gonna do is make our job. You can change cJob to anything you want
MAX_PLAYERS is gonna let this job be for the max players for ex: if you have samp players of 20 out of 100 and 10 join it will let them join because we have MAX_PLAYERS Okay so now lets put our "defined jobs' First job:
#define JOBLESS 0
you want to put that under #define Jobs 2 now for the second job :
#define [yourjobname] 1// this will define your job we're using. more will be explained
Okay so now lets move on to the job coding. so you're wondering how do you make the job so you can be set to it. Well to do that lets start by
 cJob[playerid] > 1 // we defined that using #define [yourjobname] 1
So what that does is sets your job you can use it on anything really for ex:
public OnPlayerEnterVehicle
     if(vehicle > 431)
     SendClientMessage(playerid,-1,"You have entered a bus you will now begin bus duty");
     cJob[playerid] > 1 // the job has been set to him as a bus driver"
     return 1;
What that does is when the player enters te vehicle it will get his vehicle id and if its 431 it will send him a message "you have entered a bus you will now begin bus duty"
then the job will be set to him im going to show you some commands now using cJob[playerid] > 1
and note thats just a simple job you can remove
  #define Jobs 2 and set it to #define Jobs 1 and remove #define JOBLESS thats only if you dont want a jobless job
Okay so anyways on to the commands
We're gonna use zcmd so lets start to put
#include <zcmd>
right under
#include <a_samp>
note: i will put zcmd in download Okay so lets remove
public OnPlayerCommandText
including the brackets remove those too.Okay so replace that with
CMD:join(playerid, params[])
    if(IsPlayerInRangeOfPoint(playerid, x, y,z,)) // put your posx posy and posz
     cJob[playerid] > 1
     SendClientMessage(playerid,0xeAFAFFA,"congratulation you are now [yourjobname] /help to see your new job and commands");
return 1;

CMD:myjobcommand(playerid, params[])
     if(cJob[playerid] > 0
     return SendClientMessage(playerid,-1,"your jobless!");
     SendClientMessage(playerid,-1,"your [yourjobname]");
     return 1;
Okay so thats all.

Tips: getting better and better with scripting / making jobs:
Make a job help command showing for a certain job only
Make a job command for a certain job only

credits: zcmd
credits: cluckinucker





not ni-ce
blablabla ok_299
if you OG rep me
cluckintucker is offline   Reply With Quote
Old 16/07/2013, 01:02 AM   #2
Little Clucker
Kiweeh's Avatar
Join Date: May 2013
Location: Serbia
Posts: 16
Reputation: 0
Default Re: Detailed Guide: Creating jobs (easy)

woow this is a crap....
Where is the saving?
This tut is sucks.
''Heavy Metal it's not a trend, it's way of life, a fire inside us, as along we stick together no one can fuck with us!''
Kiweeh is offline   Reply With Quote
Old 18/07/2013, 10:19 AM   #3
Big Clucker
Join Date: Dec 2012
Posts: 103
Reputation: 3
Default Re: Detailed Guide: Creating jobs (easy)

pawn Code:
     if(vehicle > 431)

Means.. every vehicle above ID 431, this won't work.

pawn Code:
if(GetVehicleModel(vehicleid) == 431)

- I suggest you to rewrite this code, It won't work.
Tingesport is offline   Reply With Quote
Old 20/07/2013, 11:40 AM   #4
Nirzor's Avatar
Join Date: Feb 2012
Location: Bangladesh
Posts: 524
Reputation: 60
Default Re: Detailed Guide: Creating jobs (easy)

This is not a good tutorial bro.Try to make a bit better cause there are many mistakes and problems.
Our Gaming Community [UG] Gaming. Join my community today.
[UG] Gaming Forums :

Looking for someone with an advanced TDM script , if you have one contact me on skype : emaz.ahmed7 ill put it on hosted tab.
Nirzor is offline   Reply With Quote
Old 20/07/2013, 04:55 PM   #5
Huge Clucker
Join Date: May 2012
Location: On the internet.
Posts: 232
Reputation: 11
Default Re: Detailed Guide: Creating jobs (easy)

how about the checkpoints and stuff like that? or random job selections?
ThaCrypte is offline   Reply With Quote
Old 20/07/2013, 04:56 PM   #6
Luis-'s Avatar
Join Date: Jan 2010
Location: England
Posts: 3,918
Reputation: 391
Default Re: Detailed Guide: Creating jobs (easy)

This is not a tutorial.
Luis- is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tutorial] A Detailed Guide to SA:MP Map Editing mattmejia Tutorials 14 13/06/2013 09:58 AM
[Tutorial] Making Pickups [ Easy Guide ] fie Tutorials 7 23/11/2011 10:12 PM
Guide to creating plugins and what files do i need? DarrenReeder Help Archive 5 29/10/2010 11:03 PM
Hosting A Server And Forwarding Ports [Detailed Guide] Ritchie999 Server Support 8 28/10/2009 10:33 PM
Creating a jobs crunch112 Help Archive 30 07/04/2009 03:19 PM

All times are GMT. The time now is 02:22 AM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.