Jump to content

Problema ban, deconectare


Recommended Posts

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.

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.