11.01.2018, 16:31
I want to create a command that repairs your vehicle, but I have issues with the timer.
I need help with kicking the player out of the vehicle and make the vehicle respawn after 1 minute. Thanks in advance.
PHP код:
CMD:repairmycar(playerid, params[])
{
if(!IsPlayerInAnyVehicle(playerid))
return SendErrorMessage(playerid, "You are not in a vehicle!");
if(GetPlayerState(playerid) != 2)
return SendErrorMessage(playerid, "You are not in the driver seat!");
if(IsPlayerInRangeOfPoint(playerid, 6.0, -2417.7744, 2303.7979, 1.8781))
return SendErrorMessage(playerid, "You should be in range of the point to /repairmycar !");
SendClientMessage(playerid, COLOR_WHITE, "Your vehicle will be ready in one hour (1 minute).");
GivePlayerMoney(playerid, - 200);
RepairVehicle(GetPlayerVehicleID(playerid));
return 1;
}