27.06.2012, 03:35
Hello Everyone i got one problem with god car when player type /godcar it fix the car but when player car damage it doesn't fix it auto. please help
PHP код:
dcmd_godcar(playerid,params[])
{
#pragma unused params
if(AccInfo[playerid][Level] >= 0 || IsPlayerAdmin(playerid))
{ GetPlayerVehicleID(playerid);
new vehicleid = GetPlayerVehicleID(playerid);
SetVehicleHealth(vehicleid, 9999999999.0);
RepairVehicle(vehicleid);
if(IsPlayerInAnyVehicle(playerid))
{
if(AccInfo[playerid][GodCar] == 0)
{
AccInfo[playerid][GodCar] = 1;
return SendClientMessage(playerid,white,"You have {32CD32}enabled{FFFFFF} godcar mode!");
}
else
{
AccInfo[playerid][GodCar] = 0;
return SendClientMessage(playerid,white,"You have {FF002B}disabled{FFFFFF} godcar mode!");
}
}
else return SendClientMessage(playerid,red,"ERROR: You need to be in a car to use this command");
}