[Help]Unknown command - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Help]Unknown command (
/showthread.php?tid=161916)
[Help]Unknown command -
keller012 - 21.07.2010
Has a command on my server that works fine
but from this:
the command is this:
Код:
if(strcmp(cmd, "/alugarcarro", true) == 0)
{
if(GetPlayerVehicleID(playerid) >= 372 && GetPlayerVehicleID(playerid) <= 377)
{
new hirefee = HireCost(GetPlayerVehicleID(playerid));
if (GetPlayerMoney(playerid) < 500)
{
SendClientMessage(playerid, COLOR_GRAD2, " Vocк nгo tem dinheiro suficiente para alugar esse carro !");
return 1;
}
if(HireCar[playerid] != 299)
{
gCarLock[HireCar[playerid]] = 0;
UnLockCar(HireCar[playerid]);
SendClientMessage(playerid, COLOR_GREY, "Vocк precisa desalugar seu carro/moto/barco primeiro !");
return 1;
}
for(new i=0; i<MAX_PLAYERS; i++)
{
if(HireCar[i] == GetPlayerVehicleID(playerid))
{
SendClientMessage(playerid, COLOR_GREY, " Alguйm ja alugou esse carro !");
return 1;
}
}
SafeGivePlayerMoney(playerid,-500);
SBizzInfo[14][sbTill] += 500;
ExtortionSBiz(14, SBizzInfo[14][sbEntranceCost]);
SBizzInfo[14][sbProducts]--;
HireCar[playerid] = GetPlayerVehicleID(playerid);
OnPropUpdate();
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "~w~Nao se esqueca de ~r~/desalugarcarro~n~~g~/fechar ~w~para travar seu carro.",hirefee);
TogglePlayerControllable(playerid, 1);
gEngine[GetPlayerVehicleID(playerid)] = 1;
GameTextForPlayer(playerid, string, 5000, 3);
}
else
{
SendClientMessage(playerid, COLOR_GREY,"Voce Nгo esta No Carros da empresa de aluguel!");
return 0;
}
return 1;
}
Anyone know why?
Re: [Help]Unknown command -
FireCat - 21.07.2010
i thinks its because pawno isnt reading it properly eu sou pt sei falar br e pt mas ingles para perceberem
you may need to swap the order of it
Re: [Help]Unknown command -
Яσскѕтая - 21.07.2010
Delete the return 1; at the very end of OnPlayerCommandText and put this in place of it
Re: [Help]Unknown command - Guest3598475934857938411 - 31.07.2010
FireCat, wtf that shit don't exist!
Re: [Help]Unknown command -
Calgon - 31.07.2010
Try returning 1, instead of 0.