23.06.2013, 15:42
i dont understand good this but try this
pawn Код:
CMD:stealfuel(playerid, params[])
{
if(PlayerInfo[playerid][pScrewdriver] == 1 && PlayerInfo[playerid][pCan] == 1 && PlayerInfo[playerid][pHosePipe] == 1)
{
new closestcar = GetClosestCar(playerid);
if(IsPlayerNearVehicle(playerid, closestcar, 7.0))
{
if(Fuel[closestcar] == 0)
{
SendClientMessage(playerid, COLOR_YELLOW,"This vehicle is out of fuel.");
}
else if(Fuel[closestcar] > 0)
{
if(PlayerInfo[playerid][pCanFuel] == 100) return SendClientMessage(playerid, COLOR_YELLOW,"Your gascan is full.");
PlayerInfo[playerid][pCanFuel] += ;
Fuel[closestcar] -= ;
}
else
{
SendClientMessage(playerid, COLOR_DARKRED,"[SERVER] {FFFFFF}You aren't near any vehicle.");
}
}
else
{
SendClientMessage(playerid, COLOR_DARKRED,"[SERVER] {FFFFFF}Make sure you got a gascan, hosepipe and a screwdriver in order to steal fuel.");
}
return 1;
}