Mission help.
#1

Hey guys, i'v been wondering what i'v done wrong, i'v tryed pretty much everything. When you enter the vehicle it will say "Press MMB to start a drug mission", then when you press MMB it doesn't work. i'v tryed using If(IsPlayerInVehicle), GetPlayerVehicleID so i'm not really sure.

Cheers in advance.

code:
pawn Код:
new Float:VanUnloads[][14] = {
    {2474.0447,1124.0911,10.8203},
    {2511.2468,1665.0664,10.8203},
    {2042.2836,2141.9180,10.8203},
    {2055.6897,2199.2947,10.8203},
    {1981.7634,2077.4819,10.8203},
    {1373.0298,1968.3542,11.2573},
    {1342.2938,1988.8014,10.8127},
    {1307.9276,2084.5015,10.8203},
    {1297.5133,2082.0200,10.8127},
    {1145.5381,2036.6021,10.8203},
    {948.7875,2073.2620,10.8203},
    {766.6767,2057.3159,6.7109},
    {587.8662,1642.3119,6.9922},
    {541.5541,1557.5353,1.0000}
};
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys == KEY_SUBMISSION)
    {
        if(IsPlayerInVehicle(playerid, 5))
        {
            new rand = random(sizeof(VanUnloads));
            SetPlayerRaceCheckpoint(playerid, 0,VanUnloads[rand][0], VanUnloads[rand][1],VanUnloads[rand][2],0,0,0,10);
            printf("Played %s has started a van mission",GetName(playerid));
        }
    }
    return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(vehicleid == 5 || vehicleid == 7 || vehicleid == 8 ||vehicleid == 4 || vehicleid == 6)
    {
        GameTextForPlayer(playerid, "To start drug missions press ~g~MMB",5000,5);
    }
    return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
    new string[100];
    new earnamount = random(5000-2000)+2000;
    GivePlayerMoney(playerid, earnamount);
    format(string,sizeof(string),"You have earnt $%d for delievering the drugs. press MMB to start another mission.",earnamount);
    SendClientMessage(playerid, COLOR_YELLOW,string);
    DisablePlayerRaceCheckpoint(playerid);
    drugmissions[playerid]++;
    return 1;
}
Reply


Messages In This Thread
Mission help. - by Haydz - 18.01.2011, 12:45
Re: Mission help. - by iggy1 - 18.01.2011, 12:52
Re: Mission help. - by Haydz - 18.01.2011, 12:58
Re: Mission help. - by iggy1 - 18.01.2011, 13:07
Re: Mission help. - by Haydz - 18.01.2011, 13:13
Re: Mission help. - by iggy1 - 18.01.2011, 13:20
Re: Mission help. - by Haydz - 18.01.2011, 13:29
Re: Mission help. - by iggy1 - 18.01.2011, 13:34

Forum Jump:


Users browsing this thread: 1 Guest(s)