What's going on here?
#1

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
    {
        SendDeathMessage(killerid, playerid, reason);
            afk[playerid] = 0;
        FadePlayerScreen(playerid, 0xFFFFFFCC, 6, 192);
        GameTextForPlayer(playerid,"~w~LOL, YOU DIED",1000,1);
        GameTextForPlayer(killerid,"~r~You Murderer!",4000,3);
        if( DMZone[killerid] >= 1 )
        {
            GivePlayerMoney(killerid, 1000);
        }
        if( DMZone[killerid] == 0 )
        {
            GivePlayerMoney(killerid, -2000);
            SendClientMessage(killerid, COLOR_RED, "Please don't kill others outside deathmatch zones. (-2000$)");
        }
        if(IsInDM[playerid] ==1)
        {
            SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
            SetPlayerScore(playerid,GetPlayerScore(playerid)-1);
            GivePlayerMoney(killerid, 1800);
            GivePlayerMoney(playerid, -1000);
        }
        if(IsInDM[playerid] ==0)
        {
            SetPlayerScore(killerid,GetPlayerScore(killerid)-1);
            GivePlayerMoney(killerid, -2000);
        }
        IsInDM[playerid] = 0;
        nojump2[playerid] = 0;
     
        return 1;
    }
When player is outside DM zone, he should loose 2k when he kills, but when he is inside the DM zone, he should get 1800 and 1 score. But no matter where players get killed, they always loose 2k!

What's wrong here?
Reply
#2

Did you make an area for DMing? Or did you make it so that if a player types a command that the variable of DMZone would be set.
Reply
#3

I changed it. I dont want people to get/lose cash.

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    SendDeathMessage(killerid, playerid, reason);
        afk[playerid] = 0;
    FadePlayerScreen(playerid, 0xFFFFFFCC, 6, 192);
    GameTextForPlayer(playerid,"~w~LOL, YOU DIED",1000,1);
    GameTextForPlayer(killerid,"~r~You Murderer!",4000,3);
    IsInDM[playerid] = 0;
    nojump2[playerid] = 0;

    return 1;
}

one warning (12364) : warning 203: symbol is never used: "DMZone" <- that line is not in my GM

This is my DMZone at top
new DMZone[MAX_PLAYERS];
Reply
#4

NVM FIXED!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)