/dropcar??
#2

pawn Код:
new bool:dropping[MAX_PLAYERS]; //add this at the top
pawn Код:
CMD:dropcar(playerid)
{
    if(GetPlayerVehicleID(playerid) != 0)
    {
        DisablePlayerCheckpoint(playerid);
        SetPlayerCheckpoint(playerid, Float:x, Float:y, Float:z, Float:size) //put the location of the checkpoint & size
        SendClientMessage(playerid, 0x00CCCCAA, "Drop the car off at the checkpoint!");
        dropping[playerid] = true;
    }
    return 1;
}
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(dropping[playerid] == true)
    {
        DisablePlayerCheckpoint(playerid);
        new str[128];
        reward = 5000;//Input your own reward value

        format(str,sizeof(str), "You've earned $%d from dropping a car!", reward);
        SendClientMessage(playerid, 0xFF0000AA, str);
        GivePlayerMoney(playerid, reward);
        dropping[playerid] = false;
    }
    return 1;
}
Reply


Messages In This Thread
/dropcar?? - by aboa - 29.09.2012, 03:43
Re: /dropcar?? - by RanSEE - 29.09.2012, 04:02
Re: /dropcar?? - by aboa - 30.09.2012, 14:15

Forum Jump:


Users browsing this thread: 1 Guest(s)