Help About Missions
#1

guys,
i need like that if someone is in Shamal (Vehicle id 519 ) it should gave him different mission !
if player is in Helicopter ( Vehicle id 487 ) should gave them different Missions !

Checkpoints For Script :
For Shamal :
Loading Point ( 1st Checkpoint ) -
Код:
1583.3839,1532.7046,10.8331
Unloading Point ( 2nd Checkpoint ) -
Код:
-1360.9259,-246.0058,14.1440
For Maverick ( id 487 ) :
Loading Point ( 1st Checkpoint ) :
Код:
1389.7053,1770.2184,10.8203
Unloading Point ( 2nd Checkpoint ) :
Код:
-1185.2230,27.0795,14.1484
Heres My Script But its Only for 3 Vehicle Ids and if player is not in these three vehicle ids, it says : You Need to Be in A Vehicle to Do Work !

Script :
pawn Код:
#include <a_samp>
#include <float>


//Colors
#define COLOR_RED 0xFF0000AA
#define COLOR_GREEN 0x00FF00AA
#define COLOR_BLUE 0x0000FFAA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_ORANGE 0xFFA500AA
#define COLOR_MENU 0xADFF2FAA //Green/Yellow
#define COLOR_MENUHEADER 0x7CFC00AA
#define COLOR_AQUA 0x66CDAAAA

forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);

//news
#pragma tabsize 0

public OnFilterScriptInit()
{
        print("\n--------------------------------------");
        print(" Work cmd");
        print("--------------------------------------\n");
        return 1;
}

public OnFilterScriptExit()
{
        return 1;
}



public OnPlayerCommandText(playerid, cmdtext[])
{
    if (!strcmp("/work", cmdtext, true))
    {
        new rand = random(3);
        switch(rand)
        {
                        case 0:
            {
                SendClientMessage(playerid, 0xFFFF00AA,"You are delivering Waste from Los Santos Airport to Landfill");
                SetPlayerCheckpoint(playerid, -694.9723, -1906.2748, 11.6886, 10.0);
                        }
                        case 1:
            {
                SendClientMessage(playerid, 0xFFFF00AA,"You are delivering Skateboards from Los Santos Airport to Haydens House");
                SetPlayerCheckpoint(playerid, -899.8469, -1947.8582, 80.2679, 10.0);
            }
                        case 2:
            {
                SendClientMessage(playerid, 0xFFFF00AA,"You are delivering Airport Parts from Los Santos Airport to Los Santos Plane Garage");
                SetPlayerCheckpoint(playerid, 1379.6129, -2416.9490, 14.4758, 10.0);
            }
       }
       return 1;
    }
    return 0;
}

public OnPlayerEnterCheckpoint(playerid)
{
        if(IsPlayerInRangeOfPoint(playerid, 5.0, -694.9723, -1906.2748, 11.6886)){
        GivePlayerMoney(playerid, 23123);
        DisablePlayerCheckpoint(playerid);
        SendClientMessage(playerid, COLOR_YELLOW, "You Delivered Waste From Los Santos Airport To Landfill");
        new str[128],name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, 24); format(str, sizeof(str), "%s Has Delivered Waste From Los Santos Airport To Landfill ", name); SendClientMessageToAll(0xFFFF00AA, str);
        } else if(IsPlayerInRangeOfPoint(playerid, 5.0, -899.8469, -1947.8582, 80.2679)){
            GivePlayerMoney(playerid, 23103);
            DisablePlayerCheckpoint(playerid);
            SendClientMessage(playerid, COLOR_YELLOW, "You Delivered Skateboards From Los Santos Airport To Haydens House");
            new str[128],name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, 24); format(str, sizeof(str), "%s Has Delivered Skateboards From Los Santos Airport To Haydens House ", name); SendClientMessageToAll(0xFFFF00AA, str);
        } else if(IsPlayerInRangeOfPoint(playerid, 5.0, 1379.6129, -2416.9490, 14.4758)){
                GivePlayerMoney(playerid, 23103);
                DisablePlayerCheckpoint(playerid);
                SendClientMessage(playerid, COLOR_YELLOW, "You delivered Airport Parts from Los Santos Airport to Los Santos Plane Garage");
                new str[128],name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, 24); format(str, sizeof(str), "%s Has delivered Airport Parts from Los Santos Airport to Los Santos Plane Garage ", name); SendClientMessageToAll(0xFFFF00AA, str); }

        return 1;
}
Reply


Messages In This Thread
Help About Missions - by Avi57 - 03.08.2012, 12:48
Re: Help About Missions - by Avi57 - 03.08.2012, 13:34
Re: Help About Missions - by [MM]RoXoR[FS] - 03.08.2012, 13:36
Re: Help About Missions - by Avi57 - 03.08.2012, 13:44
Re: Help About Missions - by Avi57 - 03.08.2012, 13:54

Forum Jump:


Users browsing this thread: 1 Guest(s)