3d Text Above Vehicle
#1

I want to make when Taxi Member types /fare. above his vehicle is written "Taxi Member On Duty! Price: NUMBER$."

Here is my command /fare

Код:
if(strcmp(cmd,"/fare",true)==0)
    {
        if(IsPlayerConnected(playerid))
	    {
	        if(PlayerInfo[playerid][pMember] == 10||PlayerInfo[playerid][pLeader] == 10|| PlayerInfo[playerid][pJob] == 14)
			{
				if(TransportDuty[playerid] > 0)
				{
				    if(TransportDuty[playerid] == 1)
				    {
				        TaxiDrivers -= 1;
				    }
				    else if(TransportDuty[playerid] == 2)
				    {
				        BusDrivers -= 1;
				    }
				    TransportDuty[playerid] = 0;
					format(string, sizeof(string), "*You are not anymore on duty and you earn{FFFFFF}%d{FFFF00}$.", TransportMoney[playerid]);
					SendClientMessage(playerid, COLOR_YELLOW, string);
					GivePlayerCash(playerid, TransportMoney[playerid]);
					TransportValue[playerid] = 0; TransportMoney[playerid] = 0;
					return 1;
				}
				new idv = GetPlayerVehicleID(playerid);
				if(IsAnTaxiCar(idv))
				{
				    if(GetPlayerState(playerid) == 2)
				    {
					    tmp = strtok(cmdtext, idx);
						if(!strlen(tmp))
						{
							SendClientMessage(playerid, COLOR_WHITE, "{FFDEBA}Koristite:{FFFFFF} /fare [Cijena]");
							return 1;
						}
						moneys = strval(tmp);
						if(moneys < 1 || moneys > 101) { SendClientMessage(playerid, COLOR_RED, "*{C4C4C4}Cijena prijevoza ne moze biti ispod $1 i preko $100."); return 1; }
					    TaxiDrivers += 1; TransportDuty[playerid] = 1; TransportValue[playerid] = moneys;
					    GetPlayerName(playerid,sendername,sizeof(sendername));
					}
					else
					{
					    SendClientMessage(playerid, COLOR_RED, "(Greska){C4C4C4} Niste vozac.");
					    return 1;
					}
				}
				else
				{
				    SendClientMessage(playerid, COLOR_RED, "(Greska){C4C4C4} Niste u Taxi vozilu ili busu.");
				}
			}
			else
			{
			    SendClientMessage(playerid, COLOR_RED, "(Greska){C4C4C4} Niste taxist ili bus vozac!");
			    return 1;
			}
	    }
	    return 1;
 	}
Reply


Messages In This Thread
3d Text Above Vehicle - by fury14 - 01.01.2013, 20:05
Re: 3d Text Above Vehicle - by IPrototypeI - 01.01.2013, 21:10
Re: 3d Text Above Vehicle - by fury14 - 01.01.2013, 22:52
AW: Re: 3d Text Above Vehicle - by IPrototypeI - 01.01.2013, 23:14

Forum Jump:


Users browsing this thread: 1 Guest(s)