Skripta ne oduzima $ igracu?

Započeo Jiky, April 11, 2020, 00:23:04 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

[pawn]public OnPlayerDeath(playerid, killerid, reason)
{
    if(GetPlayerWantedLevel(playerid)== 0)
   {
       SendClientMessage(playerid,COLOR_WHITE,"[SERVER]{AA3333}Platio si 500$ bolnici!");
       GivePlayerMoney(playerid,-500);
      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 return
      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!");[/pawn]

Ne oduzima liku pare kad crkne .. a ne izbacuje errore? fix?

daj citav onplayerdeath

TIIIIIRRRRRRUUUUUU RIIIIIIIIIIIIIIIII RUUUUUUUUUUUUU

Citat: Fqris poslato April 11, 2020, 00:25:56 PRE PODNE
daj citav onplayerdeath

[pawn]public OnPlayerDeath(playerid, killerid, reason)
{
    if(GetPlayerWantedLevel(playerid)== 0)
   {
       SendClientMessage(playerid,COLOR_WHITE,"[SERVER]{AA3333}Platio si 500$ bolnici!");
       GivePlayerMoney(playerid,-500);
      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 return
      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]