Storing Money in Vehicle
#1

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

Код:
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;
		}
	 }
Reply


Messages In This Thread
Storing Money in Vehicle - by ThatFag - 07.03.2016, 14:03
Re: Storing Money in Vehicle - by Nero_3D - 07.03.2016, 14:19
Re: Storing Money in Vehicle - by ThatFag - 09.03.2016, 12:56
Re: Storing Money in Vehicle - by CodeStyle175 - 09.03.2016, 13:03
Re: Storing Money in Vehicle - by saffierr - 09.03.2016, 13:06
Re: Storing Money in Vehicle - by ThatFag - 09.03.2016, 13:31
Re: Storing Money in Vehicle - by saffierr - 09.03.2016, 13:34

Forum Jump:


Users browsing this thread: 1 Guest(s)