Simple job help
#2

Heres what I've made for you hope it helps

pawn Код:
public OnGameModeInit()
{
    CreateObject(1318,-64.00827789,-1120.72668457,0.71267354,0.00000000,0.00000000,332.00000000); //object(arrow) (1)
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
    new vehicle = GetPlayerVehicle(playerid); // declares a new var called "vehicle"
    if(vehicle == 498) // checking if the vehicle is 498 else it will return a error message
    {
        GivePlayerMoney(playerid, 7500);
        SendClientMessage(playerid, blue, "Congratulations, you have earned 7500");
        DisablePlayerCheckpoint(playerid);
    }
    else
    {
        SendClientMessage(playerid, -1, "YOUR ERROR MESSAGE - YOUR VEHICLE IS NOT 498");
    }
    return 1;
}

COMMAND:work(playerid, params[]) // zcmd always works with "params[]" I don't think "cmdtext" will work.
{
    if (!IsPlayerInRangeOfPoint(playerid, 7.0, -64.1551,-1120.6709,1.0781))
    {
        return SendClientMessage(playerid, COLOR_RED, "You're not in range of the job");
    }
    else
    {
        SendClientMessage(playerid, blue, "Welcome to work!");
        SendClientMessage(playerid, yellow, "Please drive to the checkpoint to recieve your reward.");
        new thevehicle = CreateVehicle(498, -79.2382, -1128.1711, 1.0781, 0.0, 0, 0, 5000);
        PutPlayerInVehicle(playerid, thevehicle, 0);
        SetPlayerCheckpoint(playerid, 1827.8311,-1075.7113,23.9317, 4.0);
    }
    return 1;
}
Regards FalconX
Reply


Messages In This Thread
Simple job help - by TheDiscussionCafe - 27.05.2012, 21:33
Re: Simple job help - by FalconX - 27.05.2012, 21:37
Re: Simple job help - by TzAkS. - 27.05.2012, 21:37
Re: Simple job help - by TheDiscussionCafe - 27.05.2012, 21:48
Re: Simple job help - by [ABK]Antonio - 27.05.2012, 21:54
Re: Simple job help - by FalconX - 27.05.2012, 21:54
Re: Simple job help - by TheDiscussionCafe - 27.05.2012, 21:59
Re: Simple job help - by FalconX - 27.05.2012, 22:00
Re: Simple job help - by CidadeNovaRP - 27.05.2012, 22:04
Re: Simple job help - by TheDiscussionCafe - 27.05.2012, 22:31

Forum Jump:


Users browsing this thread: 3 Guest(s)