17.09.2014, 18:15
Well i added the timer as you might see at bottom but when im ingame it doesent show after droping the car. So basicly im spamming /dropcar at the checkpoint and i am getting payed. And how to make the car to dissapier after entering the checkpoint ?
PHP код:
CMD:dropcar(playerid, params[])
{
if(GetPlayerVehicleID(playerid) != 0)
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, 2505.8506, -2629.0144, 13.2944, 5);
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Drop the car at the crane!");
dropping[playerid] = true;
}
return 1;
}
PHP код:
public OnPlayerEnterCheckpoint(playerid)
{
if(dropping[playerid] == true)
{
DisablePlayerCheckpoint(playerid);
new string[128], price;
price = random (100);
format(string, sizeof(string), "*You've earned {FF6347}$%d{33CCFF} from dropping a car!", price);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
GivePlayerMoney(playerid, price);
dropping[playerid] = false;
SetTimerEx("DropTimer", 20000, false, "i", playerid);
}