Jump to content
  • 0

Problema /fare ajutor


maraciukka

Question

Problema intalnita (descriere): Salut ! Am o problema la care nu ii dau de capat! Deci dau /fare (taxi company) se urca player-ul in masina cu G, si cand iese din masina sau cand ies eu nici mie nu imi dispare secundele cat a stat in taxi si banii nici lui ! Mai explicit, uitati-va in acest SS, nush exact sa explic:
Ero(area / rile) / warning-(ul / urile): http://imgur.com/rPzb6r1
Liniile de cod / sursa / script-ul(obligatoriu): -
Imagini / Video (optional): http://imgur.com/rPzb6r1
Ati incercat sa rezolvati singur?: Da am incercat, dar degeaba !

 

PS: Multumesc celui care ma ajuta ! +1 !

banner.jpg

                                   

AyqDQca.gif

      

 

 

 

 

Y!M: [email protected]

 

 

 

                     

 

 

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

@NoNamed m-am uitat intr-un gamemod si sa iau de acolo dar tot la fel este

 

acesta este la onplayerexitvehicle:

 

public OnPlayerExitVehicle(playerid, vehicleid)
{
 
    KillTimer( CheckCarT[ playerid ] );
    /*if(IsPlayerInTankEvent[playerid])
{
SendClientMessage(playerid, COLOR_WHITE, "{FF0000}[Tank DM Event] {CCCCCC}Nu ai voie sa te dai jos din Tank, ai fost pus spectate pe un alt Tank random!");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerInTankEvent && TankSpectateOn == 255)
{
TankSpectateOn[playerid] = i;
TogglePlayerSpectating(playerid, 1);
PlayerSpectateVehicle(playerid, GetPlayerVehicleID(i));
}
}
}*/
if (GetPlayerState(playerid) == 1)
{
return 1;
}
if(gGas[playerid] == 1)
{
   GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~Left car", 500, 3);
}
if(IsAHarvest(vehicleid))
{
   if(FarmerVar[playerid] == 1)
   {
SetTimer("FarmerExit", 7000, 0);
GameTextForPlayer(playerid, "~n~~w~You have ~r~7~w~ seconds~n~to get back on a harvest", 5000, 3);
   }
}
if(SweeperJob[playerid] > 0)
{
SendClientMessage(playerid, COLOR_RED, "{FF8000} Ai parasit serviciul , si nu vei fi platit.");
DisablePlayerCheckpoint(playerid);
SweeperJob[playerid] = 0;
}
/*if(IsABike2(GetPlayerVehicleID(playerid)))
    {
       RemovePlayerAttachedObject(playerid, 3);
    }*/
return 1;
}

banner.jpg

                                   

AyqDQca.gif

      

 

 

 

 

Y!M: [email protected]

 

 

 

                     

 

 

Link to comment
Share on other sites

  • 0
	if(strcmp(cmd,"/fare",true)==0)
    {
        if(IsPlayerConnected(playerid))
	    {
	        if(PlayerDutyS[playerid] == -1)//report timer
        	{
       			SendClientMessage(playerid,COLOR_WHITE,"Poti da /fare doar o data la 30  secunde!");
       			return 1;
       		}
            PlayerDutyS[playerid] = -1;
        	SetTimerEx("ResetDutyS", 30000, 0, "d", playerid);
	        if(PlayerInfo[playerid][pMember] == 10||PlayerInfo[playerid][pLeader] == 10 )
			{
				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 now Off Duty and earned $%d.", TransportMoney[playerid]);
					SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
					GivePlayerMoney(playerid, TransportMoney[playerid]);
					ConsumingMoney[playerid] = 1; TransportValue[playerid] = 0; TransportMoney[playerid] = 0;
					return 1;
				}
				new Veh = GetPlayerVehicleID(playerid);
				if(Veh==txcar1||Veh==txcar2||Veh==txcar3||Veh==txcar4||Veh==txcar5||Veh==txcar6||Veh==txcar7||Veh==txcar8||Veh==txcar9||Veh==txcar10||Veh==txcar11)
				{
				    if(GetPlayerState(playerid) == 2)
				    {
					    tmp = strtok(cmdtext, idx);
						if(!strlen(tmp))
						{
							SendClientMessage(playerid, COLOR_WHITE, "USAGE: /fare [price]");
							return 1;
						}
						moneys = strval(tmp);
						if(moneys < 1 || moneys > 1500) { SendClientMessage(playerid, COLOR_GREY, "   Fare price must be between $1 and $1500 !"); return 1; }
					    TaxiDrivers += 1; TransportDuty[playerid] = 1; TransportValue[playerid] = moneys;
					    GetPlayerName(playerid,sendername,sizeof(sendername));
	    				format(string, sizeof(string), "[Advert] Taxi Driver %s is On Duty, /service Taxi to call a taxi driver. Fare: $%d.", sendername, TransportValue[playerid]);
	    				OOCNews(TEAM_GROVE_COLOR,string);
					}
					else
					{
					    SendClientMessage(playerid, COLOR_GREY, "   You are not the Driver !");
					    return 1;
					}
				}
    else if(Veh==txcar12||Veh==txcar13)
				{
				    if(GetPlayerState(playerid) == 2)
				    {
					    tmp = strtok(cmdtext, idx);
						if(!strlen(tmp))
						{
							SendClientMessage(playerid, COLOR_WHITE, "USAGE: /fare [price]");
							return 1;
						}
						moneys = strval(tmp);
						if(moneys < 1 || moneys > 1000) { SendClientMessage(playerid, COLOR_GREY, "   Fare price must be between $1 and $1000 !"); return 1; }
					    BusDrivers += 1; TransportDuty[playerid] = 2; TransportValue[playerid]= moneys;
					    GetPlayerName(playerid,sendername,sizeof(sendername));
	    				format(string, sizeof(string), "Bus Driver %s is On Duty, fare: $%d.", sendername, TransportValue[playerid]);
	    				OOCNews(TEAM_GROVE_COLOR,string);
					}
					else
					{
					    SendClientMessage(playerid, COLOR_GREY, "   You are not the Driver !");
					    return 1;
					}
				}
				else
				{
				    SendClientMessage(playerid, COLOR_GREY, "   You are not in a Taxi / Bus !");
				}
			}
			else
			{
			    SendClientMessage(playerid,COLOR_GREY,"   You are not a Taxi / Bus Driver !");
			    return 1;
			}
	    }
	    return 1;
 	}

Aceasta este comanda /fare

Edited by maraciukka

banner.jpg

                                   

AyqDQca.gif

      

 

 

 

 

Y!M: [email protected]

 

 

 

                     

 

 

Link to comment
Share on other sites

  • 0

Salut ! Uite cum am eu in gamemod unde mi-ai cerut :

 

public ResetDutyS(playerid)
{
    PlayerDutyS[playerid] = 0;
    return 1;
}
/*public ResetCommands(playerid)
{
Commands[playerid] = 0;
return 1;
}
public ResetText(playerid)
{
Text[playerid] = 0;
return 1;
}*/
 
 
Poate fi de la :
 
/*public ResetCommands(playerid)
{
Commands[playerid] = 0;
return 1;
}
public ResetText(playerid)
{
Text[playerid] = 0;
return 1;
}*/
 
pentru ca este anulata?
Edited by maraciukka

banner.jpg

                                   

AyqDQca.gif

      

 

 

 

 

Y!M: [email protected]

 

 

 

                     

 

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.