Need Help
#1

Hello ! I need help , please ! I have an error when i compile ! This is error :

Quote:

D:\Gta San Andreas\Resturi\NumeServer\pawno\include\streamer. inc(297) : warning 202: number of arguments does not match definition
D:\Gta San Andreas\Resturi\NumeServer\pawno\include\streamer. inc(304) : error 025: function heading differs from prototype
D:\Gta San Andreas\Resturi\NumeServer\gamemodes\NumeServer.pw n(4311) : warning 209: function "Streamer_OnPlayerDisconnect" should return a value
D:\Gta San Andreas\Resturi\NumeServer\gamemodes\NumeServer.pw n(27000) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

Quote:

/*================================================= =============================
public On‌PlayerDisconnect
================================================== ============================*/
public OnPlayerDisconnect(playerid)
{
if(HisPrecedentVehicle[playerid] != (-1))
{
if(!strmatch(PersonalCars[HisPrecedentVehicle[playerid]][CarOwner], "The State"))
{
new CarString[256];
format(CarString, sizeof(CarString), ""ALB"Proprietar: "ROSU"%s", PersonalCars[HisPrecedentVehicle[playerid]][CarOwner] );
Update3DTextLabelText(PersonalCars[HisPrecedentVehicle[playerid]][CarText], 0xBEBEBEFF, CarString);
}
if(strmatch(PersonalCars[HisPrecedentVehicle[playerid]][CarOwner], "The State"))
{
new CarString[256];
format(CarString, sizeof(CarString), ""ALB"Aceasta masina este de vanzare. Pret: "ROSU"%s",FormatMoney(PersonalCars[HisPrecedentVehicle[playerid]][CarPret], "."));
Update3DTextLabelText(PersonalCars[HisPrecedentVehicle[playerid]][CarText], -1, CarString);
}

}
if(PlayerPaintballing[playerid] != 0) { PaintballPlayers --; }
TextDrawHideForPlayer(playerid, Time), TextDrawHideForPlayer(playerid, Date);
TextDrawHideForPlayer(playerid,TextdrawFuel);
gActivePlayers[playerid]--;
AntiFakeKill[playerid] = 0;
numplayers--;
PlayerInfo[playerid][pAdjustable] = 1;
SavePlayerData(playerid);
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
new disconnectstring[258];
format(disconnectstring, sizeof(disconnectstring), "{FF5555}AdmCmd: Jucatorul %s a iesit de pe server (/q)", playername);
AdminsMessage(-1, disconnectstring);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(TaxiAccepted[i] < 999)
{
if(TaxiAccepted[i] == playerid)
{
TaxiAccepted[i] = 999;
GameTextForPlayer(i, "~w~Clientul~n~~r~a parasit serverul", 5000, 1);
TaxiCallTime[i] = 0;
DisablePlayerCheckpoint(i);
}
}
else if(BusAccepted[i] < 999)
{
if(BusAccepted[i] == playerid)
{
BusAccepted[i] = 999;
GameTextForPlayer(i, "~w~Clientul~n~~r~a parasit serverul", 5000, 1);
BusCallTime[i] = 0;
DisablePlayerCheckpoint(i);
}
}
}
}
if(TransportCost[playerid] > 0 && TransportDriver[playerid] < 999)
{
if(IsPlayerConnected(TransportDriver[playerid]))
{
new string[64];
TransportMoney[TransportDriver[playerid]] += TransportCost[playerid];
TransportTime[TransportDriver[playerid]] = 0;
TransportCost[TransportDriver[playerid]] = 0;
format(string, sizeof(string), "~w~Pasagerul a iesit.~n~~g~Ati primit %s",FormatMoney(TransportCost[playerid]));
GameTextForPlayer(TransportDriver[playerid], string, 5000, 1);
}
}
if(GotHit[playerid] > 0)
{
if(GetChased[playerid] < 999)
{
if(IsPlayerConnected(GetChased[playerid]))
{
SendClientMessage(GetChased[playerid], -1, ""ALB"* Tinta dumneavoastra a parasit serverul !");
GoChase[GetChased[playerid]] = 999;
}
}
}
if(HireCar[playerid] != 299)
{
gLastDriver[HireCar[playerid]] = 300;
gCarLock[HireCar[playerid]] = 0;
UnLockCar(HireCar[playerid]);
}
if(TransportDuty[playerid] == 1)
{
TaxiDrivers -= 1;
}
else if(TransportDuty[playerid] == 2)
{
BusDrivers -= 1;
}
if(PlayerInfo[playerid][pJob] == 5)
{
if(JobDuty[playerid] == 1) { Mechanics -= 1; }
}
} [Line - 4311]

Thank you very much and i wait to help me ! Thank YOU !
Reply
#2

Here you go!

pawn Код:
/*================================================= =============================
public OnPlayerDisconnect
================================================== ============================*/

public OnPlayerDisconnect(playerid)
{
if(HisPrecedentVehicle[playerid] != (-1))
{
if(!strmatch(PersonalCars[HisPrecedentVehicle[playerid]][CarOwner], "The State"))
{
new CarString[256];
format(CarString, sizeof(CarString), ""ALB"Proprietar: "ROSU"%s", PersonalCars[HisPrecedentVehicle[playerid]][CarOwner] );
Update3DTextLabelText(PersonalCars[HisPrecedentVehicle[playerid]][CarText], 0xBEBEBEFF, CarString);
}
if(strmatch(PersonalCars[HisPrecedentVehicle[playerid]][CarOwner], "The State"))
{
new CarString[256];
format(CarString, sizeof(CarString), ""ALB"Aceasta masina este de vanzare. Pret: "ROSU"%s",FormatMoney(PersonalCars[HisPrecedentVehicle[playerid]][CarPret], "."));
Update3DTextLabelText(PersonalCars[HisPrecedentVehicle[playerid]][CarText], -1, CarString);
}

}
if(PlayerPaintballing[playerid] != 0) { PaintballPlayers --; }
TextDrawHideForPlayer(playerid, Time), TextDrawHideForPlayer(playerid, Date);
TextDrawHideForPlayer(playerid,TextdrawFuel);
gActivePlayers[playerid]--;
AntiFakeKill[playerid] = 0;
numplayers--;
PlayerInfo[playerid][pAdjustable] = 1;
SavePlayerData(playerid);
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
new disconnectstring[258];
format(disconnectstring, sizeof(disconnectstring), "{FF5555}AdmCmd: Jucatorul %s a iesit de pe server (/q)", playername);
AdminsMessage(-1, disconnectstring);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(TaxiAccepted[i] < 999)
{
if(TaxiAccepted[i] == playerid)
{
TaxiAccepted[i] = 999;
GameTextForPlayer(i, "~w~Clientul~n~~r~a parasit serverul", 5000, 1);
TaxiCallTime[i] = 0;
DisablePlayerCheckpoint(i);
}
}
else if(BusAccepted[i] < 999)
{
if(BusAccepted[i] == playerid)
{
BusAccepted[i] = 999;
GameTextForPlayer(i, "~w~Clientul~n~~r~a parasit serverul", 5000, 1);
BusCallTime[i] = 0;
DisablePlayerCheckpoint(i);
}
}
}
}
if(TransportCost[playerid] > 0 && TransportDriver[playerid] < 999)
{
if(IsPlayerConnected(TransportDriver[playerid]))
{
new string[64];
TransportMoney[TransportDriver[playerid]] += TransportCost[playerid];
TransportTime[TransportDriver[playerid]] = 0;
TransportCost[TransportDriver[playerid]] = 0;
format(string, sizeof(string), "~w~Pasagerul a iesit.~n~~g~Ati primit %s",FormatMoney(TransportCost[playerid]));
GameTextForPlayer(TransportDriver[playerid], string, 5000, 1);
}
}
if(GotHit[playerid] > 0)
{
if(GetChased[playerid] < 999)
{
if(IsPlayerConnected(GetChased[playerid]))
{
SendClientMessage(GetChased[playerid], -1, ""ALB"* Tinta dumneavoastra a parasit serverul !");
GoChase[GetChased[playerid]] = 999;
}
}
}
if(HireCar[playerid] != 299)
{
gLastDriver[HireCar[playerid]] = 300;
gCarLock[HireCar[playerid]] = 0;
UnLockCar(HireCar[playerid]);
}
if(TransportDuty[playerid] == 1)
{
TaxiDrivers -= 1;
}
else if(TransportDuty[playerid] == 2)
{
BusDrivers -= 1;
}
if(PlayerInfo[playerid][pJob] == 5)
{
if(JobDuty[playerid] == 1) { Mechanics -= 1; }
}
return 1;
}
Reply
#3

Thank you man ! You`re awesome . But i added : public OnPlayerDisconnect(playerid, reason) + Your Pawn Code !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)