Taxi job money problem
#1

Код:
enum pTaxi
{
	pDutyTaxi
};
new Playerinfos[MAX_PLAYERS][pTaxi];
CMD:dutyta(playerid,params[])
{
	SendClientMessage(playerid,-1,"You are ON DUTY for TAXI driver");
	Playerinfos[playerid][pDutyTaxi] = 1;
	return 1;
}
CMD:setfee(playerid,params[])
{
	if(Playerinfos[playerid][pDutyTaxi] == 1)
	{
	    new fare,id;
	    if(sscanf(params,"dd",id,fare)) return SendClientMessage(playerid,-1,"/setfee <playerid> <fare>");
	    if(!IsPlayerConnected(id)) return SendClientMessage(playerid,-1,"Player is not connected");

		new Float:x ,Float:y,Float:z;
		GetPlayerPos(playerid,x,y,z);
	    if(!IsPlayerInRangeOfPoint(playerid,1,x,y,z))
	    {
	    	GivePlayerMoney(id,-fare);
	    	GivePlayerMoney(playerid,fare);
	    	new Float:xx,Float:yy,Float:zz;
			    	GetPlayerPos(playerid,xx,yy,zz);
			    	if(!IsPlayerInRangeOfPoint(playerid,1,xx,yy,zz))
	    	{
	    	    GivePlayerMoney(id,-fare);
	    	    GivePlayerMoney(playerid,fare);
	    	}

		}
 }
	return 1;
}
I want something like after 1KM where he types /setfee , the fare amount must be -
Reply
#2

BUMP more than 24hrs UP
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)