User GOD Mode Message not working
#1

pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    if(issuerid != INVALID_PLAYER_ID && usergod[issuerid] == 1)
    {
        SendClientMessage(playerid, COLOR_LIGHTRED, "* Player has god mode.");
    }
    return 1;
}
Can someone fix this please, the vairable is usergod[MAX_PLAYERS]; When they go on god, it sets as usergod[playerid] = 1;

I want it to show a message to the shooter ID, when they shoot someone with GOD mode enabled. (This user has god mode). (THE USER YOUR SHOOTING HAS GOD MODE), basically to the shooter id, and not the player been shot.
Reply
#2

Try using it like this:

pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    if(issuerid != INVALID_PLAYER_ID)
    {
        if(usergod[issuerid] == 1)
        {
            SendClientMessage(playerid, COLOR_LIGHTRED, "* Player has god mode.");
            return 1;
        }
    }
    return 1;
}
Reply
#3

pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    if(issuerid != INVALID_PLAYER_ID && usergod[playerid] == 1)
    {
        SendClientMessage(issuerid, COLOR_LIGHTRED, "* Player has god mode.");
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)