SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 25/04/2011, 10:10 PM   #1
Mister. M
Little Clucker
 
Join Date: Mar 2011
Posts: 43
Reputation: 4
Default Courier Job [LS]

Hello Guys.

I've created a new job (The idea isn't new, but this job is not been released yet).
I hope you guys enjoy it.

Example:
pawn Code:
#include <a_samp>

#define COLOR_DARKGOLD 0x808000AA
#define COLOR_RED 0xFF0000AA
#define COLOR_YELLOW 0xFFFF00AA

new TruckingJob[256];
new JobStatus[256];

public OnFilterScriptInit()
{
   
    AddStaticVehicle(499,1655.1216,-1806.7058,13.2722,89.1432,0,0); // --Spawn1
    AddStaticVehicle(499,1655.7910,-1820.5070,13.2732,89.5607,0,0); // --Spawn2
    AddStaticVehicle(499,1654.5166,-1837.5059,13.2737,90.1605,0,0); // --Spawn3
    AddStaticVehicle(499,1599.0535,-1791.3358,13.0810,271.2589,0,0); // --Spawn4
    AddStaticVehicle(499,1603.0015,-1824.4679,13.1864,270.6521,0,0); // --Spawn5
    AddStaticVehicle(499,1602.8961,-1837.0936,13.2257,270.2492,0,0); // --Spawn6
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/courier", cmdtext, true, 10) == 0)
    {
        if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 499)
        {
            JobStatus[playerid] = 1;
            TruckingJob[playerid] = 1;
            SetPlayerCheckpoint(playerid,1110.5992,-1327.9216,13.7145,10);
            new name[MAX_PLAYER_NAME], string[48];
            GetPlayerName(playerid, name, sizeof(name));
            format(string, sizeof(string), "* %s is now a Courier.", name );
            SendClientMessageToAll(COLOR_YELLOW, string);

            return 1;
        }
        SendClientMessage(playerid, COLOR_RED,"You have to be in a courier truck to start the job");
    }
    return 0;
}
public OnPlayerEnterCheckpoint(playerid)
{
     if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 499)
     {
        if(JobStatus[playerid] == 1){
        JobStatus[playerid] = 2;
        SetPlayerCheckpoint(playerid,2452.3928,-2570.7349,14.0369,10);
        SendClientMessage(playerid,COLOR_YELLOW,"* Please go to the next mark, and you'll be payed!");

         }else{
            JobStatus[playerid] = 1;
            GivePlayerMoney(playerid,400);
            SendClientMessage(playerid,COLOR_YELLOW,"* You have finished the job!");
            TruckingJob[playerid] = 0;
            DisablePlayerCheckpoint(playerid);
         }
     }
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
     if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 499)
     {
         SendClientMessage(playerid, COLOR_RED, "* You can start the truck-mission with /truck");
     }
     return 0;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
    if(TruckingJob[playerid] == 1)
    {
        TruckingJob[playerid] = 0;
        SendClientMessage(playerid, COLOR_RED, "* You have left your job, you won't be payed.");
        DisablePlayerCheckpoint(playerid);

    }
}

Download:
http://www.mediafire.com/?pao46a8o17bpela

Picture(s):
http://img713.imageshack.us/img713/7910/naamloosyd.png

Credit(s):
* Forum (SA-MP) - For the idea.

Enjoy,
Mister. M (BlackBerry)

Last edited by Mister. M; 26/04/2011 at 10:12 AM.
Mister. M is offline   Reply With Quote
Old 25/04/2011, 10:14 PM   #2
Mister. M
Little Clucker
 
Join Date: Mar 2011
Posts: 43
Reputation: 4
Default Re: Courier Job

I might release a whole server soon.
Mister. M is offline   Reply With Quote
Old 26/04/2011, 07:38 AM   #3
captainjohn
Huge Clucker
 
captainjohn's Avatar
 
Join Date: Jul 2010
Location: United Kingdom
Posts: 409
Reputation: 29
Default Re: Courier Job

Why don't you release all your jobs in one filterscript, instead of many little ones?
Good job anyway.
captainjohn is offline   Reply With Quote
Old 26/04/2011, 08:04 AM   #4
Lorenc_
High-roller
 
Lorenc_'s Avatar
 
Join Date: Jan 2010
Location: Australia
Posts: 3,794
Reputation: 1174
Default Re: Courier Job

Make a thread leading to all you're job scripts maybe
__________________
Join the best Cops And Robbers in SA-MP, today. svr.sfcnr.com:7777

Lorenc_ is offline   Reply With Quote
Old 26/04/2011, 08:08 AM   #5
Ghost_BB
Big Clucker
 
Join Date: Apr 2010
Posts: 54
Reputation: 0
Default Re: Courier Job

Quote:
Originally Posted by Lorenc_ View Post
Make a thread leading to all you're job scripts maybe
+ this is just a 5 mins edit of your previous Jobs.

P.S: I might use this for my Stunt server (lol)
__________________
Ghost_BB is offline   Reply With Quote
Old 26/04/2011, 08:36 AM   #6
Varkoll_
Huge Clucker
 
Varkoll_'s Avatar
 
Join Date: Dec 2009
Location: Peut-Ítre pas sur Terre ?
Posts: 247
Reputation: 61
Default Re : Courier Job

Verry good
__________________
Varkoll_ is offline   Reply With Quote
Old 26/04/2011, 05:02 PM   #7
justsomeguy
High-roller
 
justsomeguy's Avatar
 
Join Date: Apr 2010
Location: At rBn's fissa
Posts: 2,474
Reputation: 1976
Default Re: Courier Job

gonna test it!
__________________
Mooi verhaal, man.
justsomeguy is offline   Reply With Quote
Reply

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



All times are GMT. The time now is 10:24 PM.


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