TransportDriver bug?? +rep
#1

Lately i dont have any issue's on TransportDriver
but when i've update my include file to a samp 0.3.7 pawno include,

When i login on server it shows the message and enter the car it always shows the "RIDE COST " and exit

here's my code
Код:
if(TransportDriver[playerid] < MAX_PLAYERS && AdminDuty[playerid] == 0)
		{
			new string[128];
			TransportMoney[TransportDriver[playerid]] += TransportCost[playerid];
			format(string, sizeof(string), "~w~The ride cost~n~~r~$%d",TransportCost[playerid]);
			GameTextForPlayer(playerid, string, 5000, 3);
			format(string, sizeof(string), "~w~Passenger left the taxi.~n~~g~Earned $%d",TransportCost[playerid]);
			GameTextForPlayer(TransportDriver[playerid], string, 5000, 3);
			GivePlayerCash(playerid, -TransportCost[playerid]);

			new ip[32], ipex[32];
			GetPlayerIp(playerid, ip, sizeof(ip));
			GetPlayerIp(TransportDriver[playerid], ipex, sizeof(ipex));
			TaxiWarn[playerid][TransportDriver[playerid]] += TransportCost[playerid];
			if(TaxiWarn[playerid][TransportDriver[playerid]] >= 10000)
			{
				format(string, sizeof(string), "%s (IP:%s) has taxied %s (IP:%s) $%d in this session.", GetPlayerNameEx(playerid), ip, GetPlayerNameEx(TransportDriver[playerid]), ipex, TaxiWarn[playerid][TransportDriver[playerid]]);
				//Log("logs/pay.log", string);
				ABroadCast(COLOR_YELLOW, string, 1);
			}
			TransportTime[TransportDriver[playerid]] = 0;
			TransportCost[TransportDriver[playerid]] = 0;
			TransportCost[playerid] = 0;
			TransportTime[playerid] = 0;
			TransportDriver[playerid] = 999;
		}

Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{

	if(GetPlayerState(playerid) == 1)
		return 1;


	if(GetPVarInt(playerid, "rccam") == 1)
	{
		DestroyVehicle(GetPVarInt(playerid, "rcveh"));
		VehicleRadioStation[GetPVarInt(playerid, "rcveh")] = 0;
	    SetPlayerPos(playerid, GetPVarFloat(playerid, "rcX"), GetPVarFloat(playerid, "rcY"), GetPVarFloat(playerid, "rcZ"));
		DeletePVar(playerid, "rccam");
	    KillTimer(GetPVarInt(playerid, "rccamtimer"));
	}
	if(GetPVarInt(playerid, "fuelonoff") == 1)
	{
		SetPVarInt(playerid, "fuelonoff", 0);
		DestroyProgressBar(FuelBar[playerid]);
		FuelBar[playerid] = INVALID_BAR_ID;
	}
	switch(Seatbelt[playerid])
	{
	    case 1:
	    {
			new string[128];
	        if(IsABike(vehicleid))
			{
				SendClientMessageEx(playerid, COLOR_WHITE, "You have taken off your helmet.");
				format(string, sizeof(string), "* %s reaches for their helmet, and takes it off.", GetPlayerNameEx(playerid));
			}
			else
			{
				SendClientMessageEx(playerid, COLOR_WHITE, "You have taken off your seatbelt.");
				format(string, sizeof(string), "* %s reaches for their seatbelt, and unbuckles it.", GetPlayerNameEx(playerid));
			}
			ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
     		Seatbelt[playerid] = 0;
	    }
	}
	return 1;
}
Reply
#2

up....
Reply
#3

I don't see any bug in this codes and also I don't think upgrading your SAMP-Server made these errors,
Are you sure other parts of your script is okay?
If it's okay, you can send your whole GM to me for further checking
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)