16.04.2012, 13:31
Can somebody give me a /fixveh command just for admins??
Thanks
Thanks
public AutoFix(){
new i;
for(i=0;i<=MAX_PLAYERS;i++){
if(AutoFixBool[i] && IsPlayerInAnyVehicle(i)){
SetVehicleHealth(GetPlayerVehicleID(i),HealthInit[i]);
}
}
}
if (strcmp("/fix", cmdtext, true, 10) == 0)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(IsPlayerInVehicle(playerid, vehicleid))
{
SetVehicleHealth(vehicleid,1000.0);
RepairVehicle(GetPlayerVehicleID(playerid));
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
}
return 1;
}
CMD:fix(playerid,params[])
{
if(!IsPLayerAdmin(playerid) || !IsPlayerInAnyVehicle(playerid)) return 1;
RepairVehicle(GetPlayerVehicleID(playerid));
return SendClientMessage(playerid,-1,"Vehicle Fixed!");
}
if(!IsPLayerAdmin(playerid) || !IsPlayerInAnyVehicle(playerid)) return 1;
if(!IsPlayerAdmin(playerid) || !IsPlayerInAnyVehicle(playerid)) return 1;