Quote:
Originally Posted by OTACON
pawn Код:
#define MAX_FUEL (100)
if(!strcmp(ItemName, "Fuel", true)) { new vehid, string[128]; vehid = GetClosestVehicle(playerid,4.0); if(vehid <= -1) return SendClientMessage(playerid,red,"» You aren't near a vehicle!"); if(Fuel[vehid] >= MAX_FUEL) return SendClientMessage(playerid,white,"» "cred"This %s does not need anymore fuel."),GetVehicleName(vehid),Fuel[vehid] = 100; RemoveItem(playerid,"Fuel",1); format(string,sizeof string,""cjam"%s(%i) has added some fuel to his vehicle.",GetPName(playerid),playerid); SendNearMessage(playerid,white,string,20); if(PInfo[playerid][SPerk] == 2) Fuel[vehid]+=12; else Fuel[vehid]+=7; if(Fuel[vehid] > 100) Fuel[vehid] = 100; UpdateVehicleFuelAndOil(vehid); return true; }
EDIT: no se si l ohaz modificado al GetClosestVehicle, pero lo ke encontre yo no es asi .. O_o
utiliza el GetClosestVehicleForPlayer para eso..
|
gracias voy a probarlo, otra cosa tu crees que eso podria causar el cierre automatico del samp-server.exe?
es que cuando le pongo mucho fuel a un auto el server se cierra,
gracias probrare haber que tal...