PDA

View Full Version : help error please


skiplovebra
13/04/2016, 09:43 AM
I got some error please help me fix it
[debug] Run time error 20: "Invalid index parameter (bad entry point)"
[debug] Run time error 4: "Array index out of bounds"
[debug] Accessing element at index 2000 past array upper bound 1999
[13/04/2016 12:51:30] [debug] AMX backtrace:
[13/04/2016 12:51:30] [debug] #0 00458ec8 in public FC_OnPlayerDisconnect (0x0000001a, 0x00000001) from NGRP.amx
[13/04/2016 12:51:30] [debug] #1 native CallLocalFunction () [004743b0] from samp-server.exe
[13/04/2016 12:51:30] [debug] #2 0001ad60 in ?? (0x0000001a, 0x00000001) from NGRP.amx
[13/04/2016 12:51:30] [debug] #3 0000fdc4 in public keypad_OnPlayerDisconnect (0x0000001a, 0x00000001) from NGRP.amx
[13/04/2016 12:51:30] [debug] #4 native CallLocalFunction () [004743b0] from samp-server.exe
[13/04/2016 12:51:30] [debug] #5 0000a728 in public Itter_OnPlayerDisconnect (0x0000001a, 0x00000001) from NGRP.amx
[13/04/2016 12:51:30] [debug] #6 00007eb0 in public SSCANF_OnPlayerDisconnect (0x0000001a, 0x00000001) from NGRP.amx
[13/04/2016 12:51:30] [debug] #7 00000914 in public OnPlayerDisconnect (0x0000001a, 0x00000001) from NGRP.amx
OnPlayerDisconnect
public OnPlayerDisconnect(playerid, reason)
{
if(!isnull(unbanip[playerid]))
{
new string[26];
format(string, sizeof(string), "unbanip %s", unbanip[playerid]);
SendRconCommand(string);
}
KillTimer(logincheck[playerid]);
foreach(new i: Player) {
if(Spectating[i] > 0 && Spectate[i] == playerid) {
SetPVarInt(i, "SpecOff", 1);
Spectating[i] = 0;
Spectate[i] = INVALID_PLAYER_ID;
GettingSpectated[playerid] = INVALID_PLAYER_ID;
TogglePlayerSpectating(i, false);
SendClientMessageEx(i, COLOR_WHITE, "Nguoi choi ban dang theo doi da thoat khoi may chu..");
}
if(GetPVarType(i, "_dCheck") && GetPVarInt(i, "_dCheck") == playerid) {
DeletePVar(i, "_dCheck");
SendClientMessageEx(i, COLOR_WHITE, "Nguoi choi ban dang kiem tra da thoat khoi may chu.");
}
}
// Why save on people who haven't logged in!
if(gPlayerLogged{playerid} == 1)
{
g_mysql_RemoveDumpFile(GetPlayerSQLId(playerid));

if(HungerPlayerInfo[playerid][hgInEvent] == 1)
{
if(hgActive == 2)
{
if(hgPlayerCount == 3)
{
new szmessage[128];
format(szmessage, sizeof(szmessage), "** %s da dung thu ba trong su kien Hunger Games.", GetPlayerNameEx(playerid));
SendClientMessageToAll(COLOR_LIGHTBLUE, szmessage);

SetPlayerHp(playerid, HungerPlayerInfo[playerid][hgLastHealth]);
SetPlayerArmor(playerid, HungerPlayerInfo[playerid][hgLastArmour]);
SetPlayerVirtualWorld(playerid, HungerPlayerInfo[playerid][hgLastVW]);
SetPlayerInterior(playerid, HungerPlayerInfo[playerid][hgLastInt]);
SetPlayerPos(playerid, HungerPlayerInfo[playerid][hgLastPosition][0], HungerPlayerInfo[playerid][hgLastPosition][1], HungerPlayerInfo[playerid][hgLastPosition][2]);

ResetPlayerWeapons(playerid);

HungerPlayerInfo[playerid][hgInEvent] = 0;
hgPlayerCount--;
HideHungerGamesTextdraw(playerid);
PlayerInfo[playerid][pRewardDrawChance] += 10;
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "** You have been given 10 Draw Chances for the Fall Into Fun Event.");

for(new w = 0; w < 12; w++)
{
PlayerInfo[playerid][pGuns][w] = HungerPlayerInfo[playerid][hgLastWeapon][w];
if(PlayerInfo[playerid][pGuns][w] > 0 && PlayerInfo[playerid][pAGuns][w] == 0)
{
SetPlayerValidWeapon(playerid, PlayerInfo[playerid][pGuns][w], PlayerInfo[playerid][pAmmo][GetAmmoSlot(PlayerInfo[playerid][pGuns][w])]);
}
}
}
else if(hgPlayerCount == 2)
{
new szmessage[128];
format(szmessage, sizeof(szmessage), "** %s has came in second place in the Hunger Games Event.", GetPlayerNameEx(playerid));
SendClientMessageToAll(COLOR_LIGHTBLUE, szmessage);

SetPlayerHp(playerid, HungerPlayerInfo[playerid][hgLastHealth]);
SetPlayerArmor(playerid, HungerPlayerInfo[playerid][hgLastArmour]);
SetPlayerVirtualWorld(playerid, HungerPlayerInfo[playerid][hgLastVW]);
SetPlayerInterior(playerid, HungerPlayerInfo[playerid][hgLastInt]);
SetPlayerPos(playerid, HungerPlayerInfo[playerid][hgLastPosition][0], HungerPlayerInfo[playerid][hgLastPosition][1], HungerPlayerInfo[playerid][hgLastPosition][2]);

ResetPlayerWeapons(playerid);

HungerPlayerInfo[playerid][hgInEvent] = 0;
hgPlayerCount--;
HideHungerGamesTextdraw(playerid);
PlayerInfo[playerid][pRewardDrawChance] += 25;
SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "** You have been given 25 Draw Chances for the Fall Into Fun Event.");

for(new w = 0; w < 12; w++)
{
PlayerInfo[playerid][pGuns][w] = HungerPlayerInfo[playerid][hgLastWeapon][w];
if(PlayerInfo[playerid][pGuns][w] > 0 && PlayerInfo[playerid][pAGuns][w] == 0)
{
SetPlayerValidWeapon(playerid, PlayerInfo[playerid][pGuns][w], PlayerInfo[playerid][pAmmo][GetAmmoSlot(PlayerInfo[playerid][pGuns][w])]);
}
}

for(new i = 0; i < MAX_PLAYERS; i++)
{
if(HungerPlayerInfo[i][hgInEvent] == 1)
{
format(szmessage, sizeof(szmessage), "** %s has came in first place in the Hunger Games Event.", GetPlayerNameEx(i));
SendClientMessageToAll(COLOR_LIGHTBLUE, szmessage);

SetPlayerHp(i, HungerPlayerInfo[i][hgLastHealth]);
SetPlayerArmor(i, HungerPlayerInfo[i][hgLastArmour]);
SetPlayerVirtualWorld(i, HungerPlayerInfo[i][hgLastVW]);
SetPlayerInterior(i, HungerPlayerInfo[i][hgLastInt]);
SetPlayerPos(i, HungerPlayerInfo[i][hgLastPosition][0], HungerPlayerInfo[i][hgLastPosition][1], HungerPlayerInfo[i][hgLastPosition][2]);

ResetPlayerWeapons(i);

HungerPlayerInfo[i][hgInEvent] = 0;
hgPlayerCount--;
HideHungerGamesTextdraw(i);
PlayerInfo[i][pRewardDrawChance] += 50;
SendClientMessageEx(i, COLOR_LIGHTBLUE, "** You have been given 50 Draw Chances for the Fall Into Fun Event.");
hgActive = 0;

for(new w = 0; w < 12; w++)
{
PlayerInfo[i][pGuns][w] = HungerPlayerInfo[i][hgLastWeapon][w];
if(PlayerInfo[i][pGuns][w] > 0 && PlayerInfo[i][pAGuns][w] == 0)
{
SetPlayerValidWeapon(i, PlayerInfo[i][pGuns][w], PlayerInfo[i][pAmmo][GetAmmoSlot(PlayerInfo[i][pGuns][w])]);
}
}
}
}

for(new i = 0; i < 600; i++)
{
if(IsValidDynamic3DTextLabel(HungerBackpackInfo[i][hgBackpack3DText]))
{
DestroyDynamic3DTextLabel(HungerBackpackInfo[i][hgBackpack3DText]);
}
if(IsValidDynamicPickup(HungerBackpackInfo[i][hgBackpackPickupId]))
{
DestroyDynamicPickup(HungerBackpackInfo[i][hgBackpackPickupId]);
}

HungerBackpackInfo[i][hgActiveEx] = 0;
}
}
else if(hgPlayerCount > 3)
{
SetPlayerHp(playerid, HungerPlayerInfo[playerid][hgLastHealth]);
SetPlayerArmor(playerid, HungerPlayerInfo[playerid][hgLastArmour]);
SetPlayerVirtualWorld(playerid, HungerPlayerInfo[playerid][hgLastVW]);
SetPlayerInterior(playerid, HungerPlayerInfo[playerid][hgLastInt]);
SetPlayerPos(playerid, HungerPlayerInfo[playerid][hgLastPosition][0], HungerPlayerInfo[playerid][hgLastPosition][1], HungerPlayerInfo[playerid][hgLastPosition][2]);

ResetPlayerWeapons(playerid);

SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You have died and has been removed from the Hunger Games Event, better luck next time.");

HungerPlayerInfo[playerid][hgInEvent] = 0;
hgPlayerCount--;

HideHungerGamesTextdraw(playerid);

for(new w = 0; w < 12; w++)
{
PlayerInfo[playerid][pGuns][w] = HungerPlayerInfo[playerid][hgLastWeapon][w];
if(PlayerInfo[playerid][pGuns][w] > 0 && PlayerInfo[playerid][pAGuns][w] == 0)
{
SetPlayerValidWeapon(playerid, PlayerInfo[playerid][pGuns][w], PlayerInfo[playerid][pAmmo][GetAmmoSlot(PlayerInfo[playerid][pGuns][w])]);
}
}
}

new string[128];
format(string, sizeof(string), "Players in event: %d", hgPlayerCount);
for(new i = 0; i < MAX_PLAYERS; i++)
{
PlayerTextDrawSetString(i, HungerPlayerInfo[i][hgPlayerText], string);
}

return true;
}
}
if (GetPVarInt(playerid, "_BikeParkourStage") > 0)
{
new slot = GetPVarInt(playerid, "_BikeParkourSlot");
new biz = InBusiness(playerid);

DestroyDynamicPickup(GetPVarInt(playerid, "_BikeParkourPickup"));

Businesses[biz][bGymBikePlayers][slot] = INVALID_PLAYER_ID;

if (GetPVarInt(playerid, "_BikeParkourStage") > 1)
{
DestroyVehicle(Businesses[biz][bGymBikeVehicles][slot]);
Businesses[biz][bGymBikeVehicles][slot] = INVALID_VEHICLE_ID;
}
}
if (GetPVarType(playerid, "_BoxingFight"))
{
new fighterid = GetPVarInt(playerid, "_BoxingFight") - 1;
DeletePVar(fighterid, "_BoxingFight");
SendClientMessageEx(fighterid, COLOR_GREY, "The person you were fighting left the arena.");
SetPVarInt(fighterid, "_BoxingFightOver", gettime() + 1);
new biz = InBusiness(fighterid);

if (Businesses[biz][bGymBoxingArena1][0] == fighterid || Businesses[biz][bGymBoxingArena1][1] == fighterid) // first arena
{
Businesses[biz][bGymBoxingArena1][0] = INVALID_PLAYER_ID;
Businesses[biz][bGymBoxingArena1][1] = INVALID_PLAYER_ID;
}
else if (Businesses[biz][bGymBoxingArena2][0] == fighterid || Businesses[biz][bGymBoxingArena2][1] == fighterid) // second arena
{
Businesses[biz][bGymBoxingArena2][0] = INVALID_PLAYER_ID;
Businesses[biz][bGymBoxingArena2][1] = INVALID_PLAYER_ID;
}

PlayerInfo[playerid][pPos_x] = 2913.2175;
PlayerInfo[playerid][pPos_y] = -2288.1914;
PlayerInfo[playerid][pPos_z] = 7.2543;
}
if(RocketExplosions[playerid] != -1)
{
DestroyDynamicObject(Rocket[playerid]);
DestroyDynamicObject(RocketLight[playerid]);
DestroyDynamicObject(RocketSmoke[playerid]);
}

if(GetPVarType(playerid, "pBoomBox"))
{
DestroyDynamicObject(GetPVarInt(playerid, "pBoomBox"));
DestroyDynamic3DTextLabel(Text3D:GetPVarInt(player id, "pBoomBoxLabel"));
if(GetPVarType(playerid, "pBoomBoxArea"))
{
new string[128];
format(string, sizeof(string), "The boombox owner (%s) has logged off", GetPlayerNameEx(playerid));
foreach(new i: Player)
{
if(IsPlayerInDynamicArea(i, GetPVarInt(playerid, "pBoomBoxArea")))
{
StopAudioStreamForPlayerEx(i);
SendClientMessage(i, COLOR_PURPLE, string);
}
}
}
}
#if defined zombiemode
if(GetPVarType(playerid, "pZombieBit"))
{
MakeZombie(playerid);
}
#endif
if(GetPVarType(playerid, "RentedVehicle")) {
DestroyVehicle(GetPVarInt(playerid, "RentedVehicle"));
}
if(GetPVarType(playerid, "pkrTableID")) {
LeavePokerTable(playerid);
}

if(GetPVarType(playerid, "pTable")) {
DestroyPokerTable(GetPVarInt(playerid, "pTable"));
}
if(GetPVarInt(playerid, "DraggingPlayer") != INVALID_PLAYER_ID)
{
DeletePVar(GetPVarInt(playerid, "DraggingPlayer"), "BeingDragged");
}
if(pTazer{playerid} == 1) SetPlayerValidWeapon(playerid, pTazerReplace{playerid}, PlayerInfo[playerid][pAmmo][GetAmmoSlot(pTazerReplace{playerid})]);
if(GetPVarInt(playerid, "SpeedRadar") == 1) SetPlayerValidWeapon(playerid, GetPVarInt(playerid, "RadarReplacement"), 60000);

if(GetPVarInt(playerid, "MovingStretcher") != -1) {
KillTimer(GetPVarInt(playerid, "TickEMSMove"));
}

if(GetPVarInt(playerid, "Injured") == 1) {
PlayerInfo[playerid][pHospital] = 1;
KillEMSQueue(playerid);
ResetPlayerWeaponsEx(playerid);
}
if(GetPVarInt(playerid, "HeroinEffect")) {
KillTimer(GetPVarInt(playerid, "HeroinEffect"));
PlayerInfo[playerid][pHospital] = 1;
KillEMSQueue(playerid);
ResetPlayerWeaponsEx(playerid);
}
if(GetPVarInt(playerid, "AttemptPurify"))
{
Purification[0] = 0;
KillTimer(GetPVarInt(playerid, "AttemptPurify"));
}
if(control[playerid] == 1) {
control[playerid] = 0;
KillTimer(ControlTimer[playerid]);
}
if(PlayerInfo[playerid][pLockCar] != INVALID_VEHICLE_ID) {
vehicle_unlock_doors(PlayerInfo[playerid][pLockCar]);
PlayerInfo[playerid][pLockCar] = INVALID_VEHICLE_ID;
}

if(PlayerInfo[playerid][pVehicleKeysFrom] != INVALID_PLAYER_ID) {
PlayerVehicleInfo[PlayerInfo[playerid][pVehicleKeysFrom]][PlayerInfo[playerid][pVehicleKeys]][pvAllowedPlayerId] = INVALID_PLAYER_ID;
}
if(GetPVarInt(playerid, "ttSeller") != INVALID_PLAYER_ID)
{
SendClientMessageEx(GetPVarInt(playerid, "ttSeller"), COLOR_GRAD2, "The buyer has disconnected from the server.");
SetPVarInt(GetPVarInt(playerid, "ttSeller"), "ttBuyer", INVALID_PLAYER_ID);
SetPVarInt(GetPVarInt(playerid, "ttSeller"), "ttCost", 0);
SetPVarInt(playerid, "ttSeller", INVALID_PLAYER_ID);
HideTradeToysGUI(playerid);
}
if(GetPVarInt(playerid, "buyerVoucher") != INVALID_PLAYER_ID)
{
SetPVarInt(GetPVarInt(playerid, "buyerVoucher"), "sellerVoucher", INVALID_PLAYER_ID);
}
if(GetPVarInt(playerid, "sellerVoucher") != INVALID_PLAYER_ID)
{
SetPVarInt(GetPVarInt(playerid, "sellerVoucher"), "buyerVoucher", INVALID_PLAYER_ID);
}
if(HackingMods[playerid] > 0) { HackingMods[playerid] = 0; }

if(gettime() >= PlayerInfo[playerid][pMechTime]) PlayerInfo[playerid][pMechTime] = 0;
if(gettime() >= PlayerInfo[playerid][pLawyerTime]) PlayerInfo[playerid][pLawyerTime] = 0;
if(gettime() >= PlayerInfo[playerid][pDrugsTime]) PlayerInfo[playerid][pDrugsTime] = 0;
if(gettime() >= PlayerInfo[playerid][pSexTime]) PlayerInfo[playerid][pSexTime] = 0;

for(new i = 0; i < MAX_PLAYERVEHICLES; ++i) {
if(PlayerVehicleInfo[playerid][i][pvSpawned] == 1)
{
if(PlayerVehicleInfo[playerid][i][pvId] != INVALID_PLAYER_VEHICLE_ID && IsVehicleInTow(PlayerVehicleInfo[playerid][i][pvId]))
{
DetachTrailerFromVehicle(GetPlayerVehicleID(player id));
PlayerVehicleInfo[playerid][i][pvImpounded] = 1;
PlayerVehicleInfo[playerid][i][pvSpawned] = 0;
SetVehiclePos(PlayerVehicleInfo[playerid][i][pvId], 0, 0, 0); // Attempted desync fix
DestroyVehicle(PlayerVehicleInfo[playerid][i][pvId]);
PlayerVehicleInfo[playerid][i][pvId] = INVALID_PLAYER_VEHICLE_ID;
g_mysql_SaveVehicle(playerid, i);
}
}
}

new string[128];
switch(reason)
{
case 0:
{
if(PlayerInfo[playerid][pAdmin] >= 2 && Spectating[playerid] == 1)
{
PlayerInfo[playerid][pPos_x] = GetPVarFloat(playerid, "SpecPosX");
PlayerInfo[playerid][pPos_y] = GetPVarFloat(playerid, "SpecPosY");
PlayerInfo[playerid][pPos_z] = GetPVarFloat(playerid, "SpecPosZ");
PlayerInfo[playerid][pInt] = GetPVarInt(playerid, "SpecInt");
PlayerInfo[playerid][pVW] = GetPVarInt(playerid, "SpecVW");
DeletePVar(playerid, "SpecOff");
if(GetPVarType(playerid, "pGodMode"))
{
SetPlayerHp(playerid, 0x7FB00000);
SetPlayerArmor(playerid, 0x7FB00000);
}
GettingSpectated[Spectate[playerid]] = INVALID_PLAYER_ID;
Spectate[playerid] = INVALID_PLAYER_ID;
}
else
{
format(string, sizeof(string), "%s Da roi khoi may chu (Het thoi gian).", GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLO W,COLOR_YELLOW);
}
format(string, sizeof(string), "%s (ID: %d | SQL ID: %d | Cap do: %d | IP: %s) has timed out.", GetPlayerNameExt(playerid), playerid, GetPlayerSQLId(playerid), PlayerInfo[playerid][pLevel], PlayerInfo[playerid][pIP]);

if(PlayerCuffed[playerid] != 0)
{
if(PlayerCuffed[playerid] == 2)
{
SetPlayerHp(playerid, GetPVarFloat(playerid, "cuffhealth"));
SetPlayerArmor(playerid, GetPVarFloat(playerid, "cuffarmor"));
DeletePVar(playerid, "cuffhealth");
DeletePVar(playerid, "PlayerCuffed");
}
strcpy(PlayerInfo[playerid][pPrisonReason], "[OOC] Left while cuffed [Timeout]", 128);
strcpy(PlayerInfo[playerid][pPrisonedBy], "System", 128);
PlayerInfo[playerid][pJailTime] += 60*60;
}
}
case 1:
{
if(PlayerInfo[playerid][pAdmin] >= 2 && Spectating[playerid] == 1)
{
PlayerInfo[playerid][pPos_x] = GetPVarFloat(playerid, "SpecPosX");
PlayerInfo[playerid][pPos_y] = GetPVarFloat(playerid, "SpecPosY");
PlayerInfo[playerid][pPos_z] = GetPVarFloat(playerid, "SpecPosZ");
PlayerInfo[playerid][pInt] = GetPVarInt(playerid, "SpecInt");
PlayerInfo[playerid][pVW] = GetPVarInt(playerid, "SpecVW");
DeletePVar(playerid, "SpecOff");
if(GetPVarType(playerid, "pGodMode"))
{
SetPlayerHp(playerid, 0x7FB00000);
SetPlayerArmor(playerid, 0x7FB00000);
}
GettingSpectated[Spectate[playerid]] = INVALID_PLAYER_ID;
Spectate[playerid] = INVALID_PLAYER_ID;
}
else
{
format(string, sizeof(string), "%s Da roi khoi may chu (Binh thuong).", GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLO W,COLOR_YELLOW);
}
format(string, sizeof(string), "%s (ID: %d | SQL ID: %d | Cap do: %d | IP: %s) has disconnected.", GetPlayerNameExt(playerid), playerid, GetPlayerSQLId(playerid), PlayerInfo[playerid][pLevel], PlayerInfo[playerid][pIP]);

if(PlayerCuffed[playerid] != 0)
{
if(PlayerCuffed[playerid] == 2)
{
SetPlayerHp(playerid, GetPVarFloat(playerid, "cuffhealth"));
SetPlayerArmor(playerid, GetPVarFloat(playerid, "cuffarmor"));
DeletePVar(playerid, "cuffhealth");
DeletePVar(playerid, "PlayerCuffed");
}
strcpy(PlayerInfo[playerid][pPrisonReason], "[OOC] Thoat khi bi cong [Leaving]", 128);
strcpy(PlayerInfo[playerid][pPrisonedBy], "System", 128);
PlayerInfo[playerid][pJailTime] += 60*60;
new szMessage[80+MAX_PLAYER_NAME];
format(szMessage, sizeof(szMessage), "{AA3333}Thongbao{FFFF00}: %s da (/q) khi bi cong tay.", GetPlayerNameEx(playerid));
ABroadCast(COLOR_YELLOW, szMessage, 2);
}
}
case 2:
{
if(PlayerInfo[playerid][pAdmin] >= 2 && Spectating[playerid] == 1)
{
PlayerInfo[playerid][pPos_x] = GetPVarFloat(playerid, "SpecPosX");
PlayerInfo[playerid][pPos_y] = GetPVarFloat(playerid, "SpecPosY");
PlayerInfo[playerid][pPos_z] = GetPVarFloat(playerid, "SpecPosZ");
PlayerInfo[playerid][pInt] = GetPVarInt(playerid, "SpecInt");
PlayerInfo[playerid][pVW] = GetPVarInt(playerid, "SpecVW");
DeletePVar(playerid, "SpecOff");
if(GetPVarType(playerid, "pGodMode"))
{
SetPlayerHp(playerid, 0x7FB00000);
SetPlayerArmor(playerid, 0x7FB00000);
}
GettingSpectated[Spectate[playerid]] = INVALID_PLAYER_ID;
Spectate[playerid] = INVALID_PLAYER_ID;
}
else
{
format(string, sizeof(string), "%s has left the server (kicked/banned).", GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLO W,COLOR_YELLOW);
}
format(string, sizeof(string), "%s (ID: %d | SQL ID: %d | Cap do: %d | IP: %s) has been kicked/banned.", GetPlayerNameExt(playerid), playerid, GetPlayerSQLId(playerid), PlayerInfo[playerid][pLevel], PlayerInfo[playerid][pIP]);

}
}
if(EventKernel[EventRequest] == playerid)
{
EventKernel[EventRequest] = INVALID_PLAYER_ID;
ABroadCast( COLOR_YELLOW, "{AA3333}Thongbao{FFFF00}: The player that was requesting an event has disconnected/crashed.", 4 );
}
if(EventKernel[EventCreator] == playerid)
{
EventKernel[EventCreator] = INVALID_PLAYER_ID;
ABroadCast( COLOR_YELLOW, "{AA3333}Thongbao{FFFF00}: The player that was creating an event has disconnected/crashed.", 4 );
}
for(new x; x < sizeof(EventKernel[EventStaff]); x++) {
if(EventKernel[EventStaff][x] == playerid) {
EventKernel[EventStaff][x] = INVALID_PLAYER_ID;
RemovePlayerWeapon(playerid, 38);
break;
}
}
if(GetPVarInt(playerid, "IsInArena") >= 0)
{
LeavePaintballArena(playerid, GetPVarInt(playerid, "IsInArena"));
PlayerInfo[playerid][pInt] = GetPVarInt(playerid, "pbOldInt");
PlayerInfo[playerid][pVW] = GetPVarInt(playerid, "pbOldVW");
PlayerInfo[playerid][pPos_x] = GetPVarFloat(playerid, "pbOldX");
PlayerInfo[playerid][pPos_y] = GetPVarFloat(playerid, "pbOldY");
PlayerInfo[playerid][pPos_z] = GetPVarFloat(playerid, "pbOldZ");
PlayerInfo[playerid][pHealth] = GetPVarFloat(playerid, "pbOldHealth");
PlayerInfo[playerid][pArmor] = GetPVarFloat(playerid, "pbOldArmor");
SetPlayerHp(playerid,GetPVarFloat(playerid, "pbOldHealth"));
SetPlayerArmor(playerid,GetPVarFloat(playerid, "pbOldArmor"));
}
else if(GetPVarInt(playerid, "EventToken") == 0 && !GetPVarType(playerid, "LoadingObjects"))
{
if(IsPlayerInRangeOfPoint(playerid, 1200, -1083.90002441,4289.70019531,7.59999990) && PlayerInfo[playerid][pMember] == INVALID_GROUP_ID)
{
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pVW] = 0;
GetPlayerFacingAngle(playerid, PlayerInfo[playerid][pPos_r]);
PlayerInfo[playerid][pPos_x] = 1529.6;
PlayerInfo[playerid][pPos_y] = -1691.2;
PlayerInfo[playerid][pPos_z] = 13.3;
}
else
{
new Float: x, Float: y, Float: z;
PlayerInfo[playerid][pInt] = GetPlayerInterior(playerid);
PlayerInfo[playerid][pVW] = GetPlayerVirtualWorld(playerid);
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, PlayerInfo[playerid][pPos_r]);
PlayerInfo[playerid][pPos_x] = x;
PlayerInfo[playerid][pPos_y] = y;
PlayerInfo[playerid][pPos_z] = z;
}
}
else
{
PlayerInfo[playerid][pInt] = EventLastInt[playerid];
PlayerInfo[playerid][pVW] = EventLastVW[playerid];
PlayerInfo[playerid][pPos_r] = EventFloats[playerid][0];
PlayerInfo[playerid][pPos_x] = EventFloats[playerid][1];
PlayerInfo[playerid][pPos_y] = EventFloats[playerid][2];
PlayerInfo[playerid][pPos_z] = EventFloats[playerid][3];
}
if(WatchingTV[playerid] == 1)
{
PlayerInfo[playerid][pInt] = BroadcastLastInt[playerid];
PlayerInfo[playerid][pVW] = BroadcastLastVW[playerid];
PlayerInfo[playerid][pPos_r] = BroadcastFloats[playerid][0];
PlayerInfo[playerid][pPos_x] = BroadcastFloats[playerid][1];
PlayerInfo[playerid][pPos_y] = BroadcastFloats[playerid][2];
PlayerInfo[playerid][pPos_z] = BroadcastFloats[playerid][3];
WatchingTV[playerid] = 0;
viewers--;
UpdateSANewsBroadcast();
}
if(gBike[playerid] >= 0 && gBikeRenting[playerid] == 1)
{
gBike[playerid] = 0;
gBikeRenting[playerid] = 0;
KillTimer(GetPVarInt(playerid, "RentTime"));
}

if(GetPVarInt(playerid, "gpsonoff") == 1) TextDrawDestroy(GPS[playerid]);

if(PlayerInfo[playerid][pAdmin] >= 2) TextDrawDestroy(PriorityReport[playerid]);

if(InsidePlane[playerid] != INVALID_VEHICLE_ID)
{
if(!IsAPlane(InsidePlane[playerid]))
{
SetPlayerValidWeapon(playerid, 46, 60000);
PlayerInfo[playerid][pPos_x] = 0.000000;
PlayerInfo[playerid][pPos_y] = 0.000000;
PlayerInfo[playerid][pPos_z] = 420.000000;
}
else
{
new Float:X, Float:Y, Float:Z;
GetVehiclePos(InsidePlane[playerid], X, Y, Z);
PlayerInfo[playerid][pPos_x] = X;
PlayerInfo[playerid][pPos_y] = Y;
PlayerInfo[playerid][pPos_z] = Z;
if(Z > 50.0)
{
SetPlayerValidWeapon(playerid, 46, 60000);
}
}
PlayerInfo[playerid][pVW] = 0;
SetPlayerVirtualWorld(playerid, 0);
PlayerInfo[playerid][pInt] = 0;
SetPlayerInterior(playerid, 0);
InsidePlane[playerid] = INVALID_VEHICLE_ID;
}

OnPlayerStatsUpdate(playerid);
if(reason == 0)
{
new Float:pos[4];
for(new v = 0; v < MAX_PLAYERVEHICLES; v++)
{
if(PlayerVehicleInfo[playerid][v][pvId] != INVALID_PLAYER_VEHICLE_ID)
{
GetVehiclePos(PlayerVehicleInfo[playerid][v][pvId], pos[0], pos[1], pos[2]);
GetVehicleZAngle(PlayerVehicleInfo[playerid][v][pvId], pos[3]);
if(PlayerVehicleInfo[playerid][v][pvPosX] != pos[0])
{
PlayerVehicleInfo[playerid][v][pvCrashFlag] = 1;
PlayerVehicleInfo[playerid][v][pvCrashVW] = GetVehicleVirtualWorld(PlayerVehicleInfo[playerid][v][pvId]);
PlayerVehicleInfo[playerid][v][pvCrashX] = pos[0];
PlayerVehicleInfo[playerid][v][pvCrashY] = pos[1];
PlayerVehicleInfo[playerid][v][pvCrashZ] = pos[2];
PlayerVehicleInfo[playerid][v][pvCrashAngle] = pos[3];
g_mysql_SaveVehicle(playerid, v);
}
}
}

}
UnloadPlayerVehicles(playerid);
g_mysql_AccountOnline(playerid, 0);

for(new i = 0; i < MAX_REPORTS; i++)
{
if(Reports[i][ReportFrom] == playerid)
{
Reports[i][ReportFrom] = INVALID_PLAYER_ID;
Reports[i][BeingUsed] = 0;
Reports[i][TimeToExpire] = 0;
Reports[i][ReportPriority] = 0;
Reports[i][ReportLevel] = 0;
}
}
for(new i = 0; i < MAX_CALLS; i++)
{
if(Calls[i][CallFrom] == playerid)
{
if(Calls[i][BeingUsed] == 1) DeletePVar(Calls[i][CallFrom], "Has911Call");
strmid(Calls[i][Area], "None", 0, 4, 4);
strmid(Calls[i][MainZone], "None", 0, 4, 4);
strmid(Calls[i][Description], "None", 0, 4, 4);
Calls[i][RespondingID] = INVALID_PLAYER_ID;
Calls[i][CallFrom] = INVALID_PLAYER_ID;
Calls[i][Type] = -1;
Calls[i][TimeToExpire] = 0;
}
}
foreach(new i: Player)
{
if (GetPVarType(i, "hFind") && GetPVarInt(i, "hFind") == playerid)
{
SendClientMessageEx(i, COLOR_GREY, "The person you were tracking has disconnected.");
DeletePVar(i, "hFind");
DisablePlayerCheckpoint(i);
}
if (GetPVarType(i, "Backup") && GetPVarInt(i, "Backup") == playerid)
{
SendClientMessageEx(i, COLOR_GREY, "The person who called for backup has disconnected.");
DeletePVar(i, "Backup");
}
if(TaxiAccepted[i] == playerid)
{
TaxiAccepted[i] = INVALID_PLAYER_ID;
GameTextForPlayer(i, "~w~Taxi Caller~n~~r~Left the game", 5000, 1);
TaxiCallTime[i] = 0;
DisablePlayerCheckpoint(i);
}
if(EMSAccepted[i] == playerid)
{
EMSAccepted[i] = INVALID_PLAYER_ID;
GameTextForPlayer(i, "~w~EMS Caller~n~~r~Left the game", 5000, 1);
EMSCallTime[i] = 0;
DisablePlayerCheckpoint(i);
}
if(BusAccepted[i] == playerid)
{
BusAccepted[i] = INVALID_PLAYER_ID;
GameTextForPlayer(i, "~w~Bus Caller~n~~r~Left the game", 5000, 1);
BusCallTime[i] = 0;
DisablePlayerCheckpoint(i);
}
if(MedicAccepted[i] == playerid)
{
TaxiAccepted[playerid] = INVALID_PLAYER_ID; BusAccepted[playerid] = INVALID_PLAYER_ID; MedicAccepted[playerid] = INVALID_PLAYER_ID;
GameTextForPlayer(i, "~w~Medic Caller~n~~r~Left the game", 5000, 1);
MedicCallTime[i] = 0;
DisablePlayerCheckpoint(i);
}
if(OrderAssignedTo[i] == playerid)
{
OrderAssignedTo[i] = INVALID_PLAYER_ID;
}
}
if(TransportCost[playerid] > 0 && TransportDriver[playerid] != INVALID_PLAYER_ID)
{
if(IsPlayerConnected(TransportDriver[playerid]))
{
TransportMoney[TransportDriver[playerid]] += TransportCost[playerid];
TransportTime[TransportDriver[playerid]] = 0;
TransportCost[TransportDriver[playerid]] = 0;
format(string, sizeof(string), "~w~Passenger left~n~~g~Earned $%d",TransportCost[playerid]);
GameTextForPlayer(TransportDriver[playerid], string, 5000, 1);
TransportDriver[playerid] = INVALID_PLAYER_ID;
}
}
if(GotHit[playerid] > 0)
{
if(GetChased[playerid] != INVALID_PLAYER_ID)
{
if(IsPlayerConnected(GetChased[playerid]))
{
SendClientMessageEx(GetChased[playerid], COLOR_YELLOW, "Your hit has left the server.");
GoChase[GetChased[playerid]] = INVALID_PLAYER_ID;
}
}
}
if(GoChase[playerid] != INVALID_PLAYER_ID)
{
GetChased[GoChase[playerid]] = INVALID_PLAYER_ID;
GotHit[GoChase[playerid]] = INVALID_PLAYER_ID;
}
if(HireCar[playerid] != 299)
{
vehicle_unlock_doors(HireCar[playerid]);
}
if (gLastCar[playerid] > 0)
{
if(PlayerInfo[playerid][pPhousekey] != gLastCar[playerid]-1)
{
vehicle_unlock_doors(gLastCar[playerid]);
}
}
if(PlayerBoxing[playerid] > 0)
{
if(Boxer1 == playerid)
{
if(IsPlayerConnected(Boxer2))
{
if(IsPlayerInRangeOfPoint(PlayerBoxing[Boxer2], 20.0, 768.94, -70.87, 1001.56))
{
PlayerBoxing[Boxer2] = 0;
SetPlayerPos(Boxer2, 768.48, -73.66, 1000.57);
SetPlayerInterior(Boxer2, 7);
GameTextForPlayer(Boxer2, "~r~Match interupted", 5000, 1);
}
PlayerBoxing[Boxer2] = 0;
SetPlayerPos(Boxer2, 765.8433,3.2924,1000.7186);
SetPlayerInterior(Boxer2, 5);
GameTextForPlayer(Boxer2, "~r~Match interupted", 5000, 1);
}
}
else if(Boxer2 == playerid)
{
if(IsPlayerConnected(Boxer1))
{
if(IsPlayerInRangeOfPoint(PlayerBoxing[Boxer1],20.0,764.35, -66.48, 1001.56))
{
PlayerBoxing[Boxer1] = 0;
SetPlayerPos(Boxer1, 768.48, -73.66, 1000.57);
SetPlayerInterior(Boxer1, 7);
GameTextForPlayer(Boxer1, "~r~Match interupted", 5000, 1);
}
PlayerBoxing[Boxer1] = 0;
SetPlayerPos(Boxer1, 765.8433,3.2924,1000.7186);
SetPlayerInterior(Boxer1, 5);
GameTextForPlayer(Boxer1, "~r~Match interupted", 5000, 1);
}
}
InRing = 0;
RoundStarted = 0;
Boxer1 = INVALID_PLAYER_ID;
Boxer2 = INVALID_PLAYER_ID;
TBoxer = INVALID_PLAYER_ID;
}
if(GetPVarInt(playerid, "AdvisorDuty") == 1)
{
Advisors--;
}
if(TransportDuty[playerid] == 1)
{
TaxiDrivers -= 1;
}
else if(TransportDuty[playerid] == 2)
{
BusDrivers -= 1;
}
if(PlayerInfo[playerid][pJob] == 11 || PlayerInfo[playerid][pJob2] == 11)
{
if(JobDuty[playerid] == 1) { Medics -= 1; }
}
if(PlayerInfo[playerid][pJob] == 7 || PlayerInfo[playerid][pJob2] == 7)
{
if(GetPVarInt(playerid, "MechanicDuty") == 1) { Mechanics -= 1; }
}
if(PlayerInfo[playerid][pJob] == 11 || PlayerInfo[playerid][pJob2] == 11)
{
if(JobDuty[playerid] == 1) { Coastguard -= 1; }
}
new Float:health, Float:armor;
if(GetPVarType(playerid, "pGodMode") == 1)
{
health = GetPVarFloat(playerid, "pPreGodHealth");
SetPlayerHp(playerid,health);
armor = GetPVarFloat(playerid, "pPreGodArmor");
SetPlayerArmor(playerid, armor);
DeletePVar(playerid, "pGodMode");
DeletePVar(playerid, "pPreGodHealth");
DeletePVar(playerid, "pPreGodArmor");
}
if(GetPVarInt(playerid, "ttSeller") >= 0)
{
DeletePVar(playerid, "ttSeller");
HideTradeToysGUI(playerid);
}
if(IsValidDynamic3DTextLabel(RFLTeamN3D[playerid])) {
DestroyDynamic3DTextLabel(RFLTeamN3D[playerid]);
}
pSpeed[playerid] = 0.0;
SetPVarInt(playerid, "PlayerOwnASurf", 0);
}
DeletePVar(playerid, "ViewedPMOTD");
gPlayerLogged{playerid} = 0;
for(new x = 1; x <= MAX_VEHICLES; ++x)
{
if(FishingVeh[x] == playerid)
{
FishingVeh[x] = INVALID_PLAYER_ID;
}
}
TextDrawHideForPlayer(playerid, RPTTime), TextDrawHideForPlayer(playerid, RPTDate);
DaThamGiaSanBoss[playerid] = 0;
SatThuongBoss[playerid] = 0;
return 1;
}

skiplovebra
13/04/2016, 11:43 AM
update

skiplovebra
13/04/2016, 12:38 PM
help

skiplovebra
13/04/2016, 02:43 PM
help me please

Sew_Sumi
13/04/2016, 06:09 PM
Get out of here with your stolen/leaked script...

jlalt
13/04/2016, 07:10 PM
Get out of here with your stolen/leaked script...

Get out of here with your stolen/leaked reply, prove to us it's stolen script.

Sew_Sumi
13/04/2016, 07:37 PM
Get out of here with your stolen/leaked reply, prove to us it's stolen script.

Because it's a leaked version of NGRPs script, Hence the "Fall into fun" and the "Token" system.