mod:gf
opis problema:Ne radi mi komanda! Kada ukucam fill izbaci mi da u vozilo stane max 40 l!!
if(strcmp(cmd,"/fill", true) == 0)
{
{
if(IsPlayerInAnyVehicle(playerid))
{
if(IsAtGasStation(playerid))
{
new
aFuel;
tmp = strtok(cmdtext, aFuel);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: (/w)hisper [ID Igraca/Dio Imena] [whisper text]");
return 1;
}
{
new fPrice = aFuel * 5 ;
if(GetPlayerCash(playerid) >= fPrice)
{
new
FuelLimit,
vID = GetPlayerVehicleID(playerid);
if(IsACar(vID)) FuelLimit = 40;
else if(IsABike(vID)) FuelLimit = 15;
else FuelLimit = 35;
if(FuelLimit >= (aFuel + vFuel))
{
GivePlayerCash(playerid, -fPrice);
vFuel = vFuel + aFuel;
}
else
{
new
pMsg;
format(pMsg, sizeof(pMsg), "U vase vozilo ne stane toliko goriva. U vase vozila stane max.: %i L", FuelLimit);
SendClientMessage(playerid, COLOR_RED, pMsg);
}
}
else SendClientMessage(playerid, COLOR_RED, "Nemas dovoljno novaca da kupis toliko litara goriva.");
}
}
else
{
SCM( playerid, WHITE, "Nisi kod benzinske pumpe!" );
}
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "Moras biti u vozilu da koristis ovu komandu.");
}
return 1;
}
}
[pomoc]fill
417
pregleda
2
postova
30. Jan. 2012.
Morate biti prijavljeni da biste odgovorili na ovu temu.
Prijava