repair vehicle question! :D
#6

Quote:
Originally Posted by gamer931215
Посмотреть сообщение
try this (didnt test it)

pawn Код:
dcmd_fix(playerid,params[]){
#pragma unused params
if (!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_RED,"You are not in an vehicle!");
    if (GetVehicleDamage(GetPlayerVehicleID(playerid)) > GetPlayerMoney(playerid)) return SendClientMessage(playerid,COLOR_RED,"You dont have enough money!");
    RepairVehicle(GetPlayerVehicleID(playerid));
    SendClientMessage(playerid,COLOR_GREEN,"Your vehicle has been repaired!");
}
stock GetVehicleDamage(vehicleid)
{
    new Float:vhealth;
    GetVehicleHealth(GetPlayerVehicleID(playerid),vhealth);
    return (1000 - vhealth);
}
Hope it works , did only test it for warnings/errors.

Didnt test it, so hope it works

Edit others were faster as me, anyways i guess this function works then because that other guy says the same.

C:\Users\Desktop\DeathRace0.3b\gamemodes\DR.pwn(36 7) : error 017: undefined symbol "GetVehicleDamage"
C:\Users\Desktop\DeathRace0.3b\gamemodes\DR.pwn(37 1) : error 029: invalid expression, assumed zero
C:\Users\Desktop\DeathRace0.3b\gamemodes\DR.pwn(37 1) : error 017: undefined symbol "GetVehicleDamage"
C:\Users\Desktop\DeathRace0.3b\gamemodes\DR.pwn(37 5) : warning 213: tag mismatch
C:\Users\Desktop\DeathRace0.3b\gamemodes\DR.pwn(37 7) : warning 225: unreachable code
Reply


Messages In This Thread
repair vehicle question! :D - by WillyP - 03.09.2010, 18:24
Re: repair vehicle question! :D - by CyNiC - 03.09.2010, 18:36
Re: repair vehicle question! :D - by Mauzen - 03.09.2010, 18:37
Re: repair vehicle question! :D - by gamer931215 - 03.09.2010, 18:40
Re: repair vehicle question! :D - by Voldemort - 03.09.2010, 18:48
Re: repair vehicle question! :D - by WillyP - 03.09.2010, 19:36
Re: repair vehicle question! :D - by [XST]O_x - 03.09.2010, 20:01
Re: repair vehicle question! :D - by WillyP - 03.09.2010, 20:10

Forum Jump:


Users browsing this thread: 1 Guest(s)