Oko weapon-config returnovanje skina CJ-a f4

Započeo Skorpija_026, Mart 26, 2022, 14:41:29 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.

Problem(error/warning): Ovako igrac koji god klikne f4 nakon smrti dobije CJ i on je besmrtan probao sam i da OnPlayerRequestClass clearam animaciju i setam HP 0 ali ne pomaze nista, takodje i na smrti sam isto to probao i opet ne radi OnPlayerDeath, Ne znam vise stvarno sta bi odradio
Deo skripte: Include , Weapon Config
Pawno Code: [Izaberi] [pawn]public OnPlayerRequestClass(playerid, classid)
{
   DebugMessage(playerid, "Requested class: %d", classid);

   if (s_DeathSkip[playerid]) {
      DebugMessage(playerid, "Skipping death - class selection skipped");
      SpawnPlayer(playerid);
      SetPlayerHealth(playerid, 0.0);
      ClearAnimations(playerid);
      return 0;
   }

   if (s_ForceClassSelection[playerid]) {
      s_ForceClassSelection[playerid] = false;
   }

   if (s_BeingResynced[playerid]) {
      s_TrueDeath[playerid] = false;

      SpawnPlayerInPlace(playerid);
      SetPlayerHealth(playerid, 0.0);
      ClearAnimations(playerid);
      return 0;
   }

   if (s_DeathTimer[playerid] != -1) {
      KillTimer(s_DeathTimer[playerid]);
      s_DeathTimer[playerid] = -1;
   }

   if (s_IsDying[playerid]) {
      OnPlayerDeathFinished(playerid, false);
      s_IsDying[playerid] = false;
   }

   FreezeSyncPacket(playerid, .toggle = false);
   UpdatePlayerVirtualWorld(playerid);

   if (s_TrueDeath[playerid]) {
      if (!s_InClassSelection[playerid]) {
         DebugMessage(playerid, "True death class selection");

         new Float:x, Float:y, Float:z;
         GetPlayerPos(playerid, x, y, z);
         RemoveBuildingForPlayer(playerid, 1484, x, y, z, 350.0),
         RemoveBuildingForPlayer(playerid, 1485, x, y, z, 350.0),
         RemoveBuildingForPlayer(playerid, 1486, x, y, z, 350.0);

         s_InClassSelection[playerid] = true;
         SetPlayerHealth(playerid, 0.0);
         ClearAnimations(playerid);
      }

      if (WC_OnPlayerRequestClass(playerid, classid)) {
         s_PlayerClass[playerid] = classid;

         return 1;
      } else {
         return 0;
      }
   } else {
      DebugMessage(playerid, "Not true death - being respawned");

      s_ForceClassSelection[playerid] = true;

      SpawnPlayerInPlace(playerid);

      return 0;
   }
}[/pawn]
[pawn]public OnPlayerDeath(playerid, killerid, reason)
{
   s_TrueDeath[playerid] = true;
   s_InClassSelection[playerid] = false;
   SetPlayerHealth(playerid, 0.0);
   ClearAnimations(playerid);[/pawn]

Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log):
Pawno Code: [Izaberi]
Poslednja Izmena: Maj 01, 2022, 23:16:59 POSLE PODNE od Deleted User
Vandals Project OGC
[size=11.25pt]Vandals Project OGC[/size][/font]
[/color]


Citat: Fr0z3n poslato Mart 26, 2022, 15:46:25 POSLE PODNE
a sta f4 dugme radi?
class nmp ni ja ali pre nego sto me killa neko kliknem f4 i fobijem cj skin i bukv besmrtan
Vandals Project OGC
[size=11.25pt]Vandals Project OGC[/size][/font]
[/color]

Ne znam sad ovako na suvo, najosnovnije nesto sto moze biti jeste da timer proveri posle 5 sec nakon umiranja da li imas cj skin/da li ti je hp u minusu, ako jeste opet kill...

Citat: Fr0z3n poslato Mart 26, 2022, 19:02:33 POSLE PODNE
Ne znam sad ovako na suvo, najosnovnije nesto sto moze biti jeste da timer proveri posle 5 sec nakon umiranja da li imas cj skin/da li ti je hp u minusu, ako jeste opet kill...
Proverio sam sve mi je cisto sto se toga tice ne moze nikako da se seta cj skin sem na ovaj nacin
Vandals Project OGC
[size=11.25pt]Vandals Project OGC[/size][/font]
[/color]

Citat: Skorpija_026 poslato Mart 26, 2022, 16:05:18 POSLE PODNE
class nmp ni ja ali pre nego sto me killa neko kliknem f4 i fobijem cj skin i bukv besmrtan
F4   Allows you to select a new class upon your next death.
BIGDOG ENTERTAINMENT

Citat: A L M E X poslato Mart 26, 2022, 21:05:55 POSLE PODNE
F4   Allows you to select a new class upon your next death.

Upravo to
Vandals Project OGC
[size=11.25pt]Vandals Project OGC[/size][/font]
[/color]

Neko ukoliko zna samo nek napise u cemu je problem.
Vandals Project OGC
[size=11.25pt]Vandals Project OGC[/size][/font]
[/color]

Fixed
Vandals Project OGC
[size=11.25pt]Vandals Project OGC[/size][/font]
[/color]