mod:gf
opis problema:ovako u ovom modu se koriste cmd komande al ja sam dodao jednu zcmd komandu i sada kada ukucam neku cmd komandu pise mi UNKNOW command :S Kako mogu ovo rijesit
CMD:fill(playerid, params[])
{
if(IsPlayerInAnyVehicle(playerid))
{
if(IsAtGasStation(playerid))
{
new
aFuel;
if(sscanf(params, "i", aFuel)) return SendClientMessage(playerid, 0xEFEFF7AA, "{FFFFFF}Koristi:{AADD00} /fill <koliko litara>");
else
{
new fPrice = aFuel * 10 ;
if(GetPlayerMoney(playerid) >= fPrice)//if(GetPlayerMoney(playerid) >= 100)
{
new
FuelLimit,
vID = GetPlayerVehicleID(playerid);
if(IsACar(vID)) FuelLimit = 50;
else if(IsABike(vID)) FuelLimit = 30;
else FuelLimit = 50;
if(FuelLimit >= (aFuel + vFuel[vID]))
{
GetPlayerMoney(playerid, -fPrice);
vFuel[vID] = vFuel[vID] + aFuel;
}
else
{
new
pMsg[69];
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, COLOR_WHITE, "Nisi kod benzinske pumpe!" );
}
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "Moras biti u vozilu da koristis ovu komandu.");
}
return 1;
}
mislis u tom se modu koriste strcmp a ne cmd...
gdje si stavio tu komandu ?
i dali ti samo na topj komadni izbacuje unkown command ?
hmm jel moguce koristit ove dvije vrste komandi u jednom modu