Jump to content

Recommended Posts

Posted

Salut, as avea o problema la un gamemode de la 0 inceput de catre mine si un prieten. Cand dau /q pica serverul / respectiv daca dau ban, kick etc practic cand se deconecteaza un jucator, as aprecia enorm daca cineva ar putea sa ma ajute.

Posted

Am gasit eu problema, la onplayerdisconnect se distrug toate masinile personale ale jucatorului si de aceea lua crash, am rezolvat facand asta:

cod vechi:

   foreach(i : PersonalVehicles[playerid]) {
       if(CarInfo[i][cSpawned] != INVALID_VEHICLE_ID) DestroyVehicleEx(CarInfo[i][cSpawned]);
       Iter_SafeRemove(TotalPersonals, i, i);
       Iter_SafeRemove(PersonalVehicles[playerid], i, i);
   }

 

cod nou:

   foreach(i : PersonalVehicles[playerid]) {
       if(CarInfo[i][cSpawned] != INVALID_VEHICLE_ID) DestroyVehicleEx(CarInfo[i][cSpawned]);
       Iter_Remove(TotalPersonals, i); // am scos saferemove
       Iter_SafeRemove(PersonalVehicles[playerid], i, i);
   }

  • Upvote 1
Posted
Acum 43 minute, NERS a spus:

Am gasit eu problema, la onplayerdisconnect se distrug toate masinile personale ale jucatorului si de aceea lua crash, am rezolvat facand asta:

cod vechi:

   foreach(i : PersonalVehicles[playerid]) {
       if(CarInfo[i][cSpawned] != INVALID_VEHICLE_ID) DestroyVehicleEx(CarInfo[i][cSpawned]);
       Iter_SafeRemove(TotalPersonals, i, i);
       Iter_SafeRemove(PersonalVehicles[playerid], i, i);
   }

 

cod nou:

   foreach(i : PersonalVehicles[playerid]) {
       if(CarInfo[i][cSpawned] != INVALID_VEHICLE_ID) DestroyVehicleEx(CarInfo[i][cSpawned]);
       Iter_Remove(TotalPersonals, i); // am scos saferemove
       Iter_SafeRemove(PersonalVehicles[playerid], i, i);
   }

Mersi frumos

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.