26.12.2018, 12:47
PHP код:
CMD:repaircar(playerid, params[])
{
new vehid = GetPlayerVehicleID(playerid);
RepairVehicle(vehid);
GivePlayerMoney(playerid, -850);
return 1;
}
CMD:repaircar(playerid, params[])
{
new vehid = GetPlayerVehicleID(playerid);
RepairVehicle(vehid);
GivePlayerMoney(playerid, -850);
return 1;
}
CMD:repaircar(playerid, params[]) { if(gettime() - GetPVarInt(playerid,"last_time_repaircar") < 20*60*1000) return 0; SetPVarInt(playerid,"last_time_repaircar",gettime( )); new vehid = GetPlayerVehicleID(playerid); RepairVehicle(vehid); GivePlayerMoney(playerid, -850); return 1; } |
CMD:repaircar(playerid, params[]) { if(gettime() - GetPVarInt(playerid,"last_time_repaircar") < 200000) return SendClientMessage(playerid, 0xAA3333AA, "[SERVER]: You can use this command only one time every 20 minutes!"); SetPVarInt(playerid,"last_time_repaircar",gettime( )); if(GetPlayerMoney(playerid) < 850) return SendClientMessage(playerid, 0xAA3333AA, "[SERVER]: You don't have enough money to repair your car!"); if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xAA3333AA, "[SERVER]: You must be in vehicle to use this command!"); RepairVehicle(playerid); // No need to add ' new vehid '. GivePlayerMoney(playerid, -850); return 1; }