Skripta ne oduzima pare igracu kad umre

Započeo Jiky, April 11, 2020, 01:35:43 PRE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Problem(error/warning): ne gubi lik pare kad crkne..
Dio skripte: [ pawn ]public OnPlayerDeath(playerid, killerid, reason)
{
    if(GetPlayerWantedLevel(playerid)== 0)
   {
       SendClientMessage(playerid,COLOR_WHITE,"[SERVER]{AA3333}Platio si 500$ bolnici!");
       GivePlayerMoney(playerid,-500);
      else if(GetPlayerWantedLevel(playerid)== 3)
      {
         GivePlayerMoney(playerid,-1500);
         SetPlayerWantedLevel(playerid,0);
         SendClientMessage(playerid,COLOR_WHITE,"[SERVER]{AA3333}Umro si sa 3 WL, platio si 1000$");
         SendClientMessage(playerid,COLOR_WHITE,"[SERVER]{AA3333}Platio si 500$ bolnici!");
      }
      else
      GivePlayerMoney(playerid,-3000);
      SetPlayerWantedLevel(playerid,0);
      SendClientMessage(playerid,COLOR_WHITE,"[SERVER]{AA3333}Umro si sa 6 WL, platio si 2500$");
      SendClientMessage(playerid,COLOR_WHITE,"[SERVER]{AA3333}Platio si 500$ bolnici!");
   }
   if(gTeam[killerid] == TEAM_COPS)
   {
       if(gTeam[playerid] == TEAM_COPS)
       {
           SendClientMessage(killerid,COLOR_BLUE,"[SERVER]{AA3333}Team Killing nije dozvoljen! Oduzeta su ti sva oruzja!");
           ResetPlayerWeapons(killerid);
      }
      else
      {
          if(GetPlayerWantedLevel(playerid)== 0)
          {
              SendClientMessage(killerid,COLOR_WHITE,"[SERVER]{AA3333}Ubio si nevinog igraca!");
              ResetPlayerWeapons(killerid);
         }
         else if(GetPlayerWantedLevel(playerid) == 3) return GivePlayerMoney(playerid,1500);
         else return GivePlayerMoney(killerid,3000);
      }
   }
   else
   {
       if(GetPlayerWantedLevel(killerid) == 0 || GetPlayerWantedLevel(killerid) == 3)
      {
          SetPlayerWantedLevel(killerid,6);
          SetPlayerColor(killerid,COLOR_RED);
          GivePlayerMoney(killerid,1500);
          SendClientMessage(killerid,COLOR_WHITE,"[SERVER]{AA3333}Pocinio si teski zlocin. Wanted Level: 6!");
      }
      else return GivePlayerMoney(killerid,1500);
   }
   return 1;
}[ /pawn ]
Slika/video ingame problema(obavezno ako je ingame problem): ne treba

Ne gubi ovako novac kad stavis GivePlayerMoney (nemoguce) ili ti ne cuva novac u bazi podataka ?