07.03.2016, 14:03
Hey.I am trying to make a cmd that allows players to store money in vehicle but i dont know whats wrong with it.
i get no errors at pawno but when i go in game i press the command and it doesnt ask me for amount that i want to put .
here is my script
i get no errors at pawno but when i go in game i press the command and it doesnt ask me for amount that i want to put .
here is my script
Код:
COMMAND:store(playerid, params[])
{
new tmp[300], iAmount;
if(sscanf(params, "s", tmp, iAmount)) return SCP(playerid, "/(money) [Amount]");
new car = GetPlayerNearestVehicle(playerid);
if(GetDistanceFromPlayerToVehicle(playerid, car) > 5.0)
return SendClientError(playerid, "There is no vehicle around you!");
if(!strcmp(tmp, "money", true , 7 ))
{
if(iAmount > HandMoney(playerid)) return SendClientError(playerid, " You dont have that amount of cash in hand ");
{
HandMoney(playerid) -= iAmount;
comps[car][money] += iAmount;
SendClientMessage(playerid, COLOR_GREEN, " You have succesfuly stored money in the vehicle " );
return 1;
}
}


