Possibe?
#4

Quote:
Originally Posted by Voxel
Посмотреть сообщение
Its possible, do research on "OnPlayerGive/TakeDamage" and "GetPlayerWeapon" and you will need to make a stock to send the message to all the online admins.
Quote:
Originally Posted by pds2k12
Посмотреть сообщение
I did not really get what you mean, in my understanding, You want to show an admin a warning if the killer killed someone using a spraycan.

pawn Код:
//This callback gets called when the player dies.
public OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid == INVALID_PLAYER_ID ) return false; //if the player is not connected or INVALID, this function will return nothing.

    if( GetPlayerWeapon(killerid) == 41)
    {
        return SendClientMessage(playerid, -1, "You have been killed by a spraycan"), SendClientMessage(killerid, -1, "You killed someone using a spraycan");
    }
    return true;
}

//This callback gets called when the player gets hit by a specific weapon.
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
    if( weaponid == 41)//This function gets the player weapon id.
    {
        return SendClientMessage(playerid, -1, "You have been attacked by a spraycan"), SendClientMessage(issuerid, -1, "You attacked someone using a spraycan");
    }
    return true;
}
Thank you so much, but if you can help me please with that, i'm getting a warning about this:
Quote:

error 021: symbol already defined: "OnPlayerDeath"

how to fix that? i used your code!
Reply


Messages In This Thread
Possibe? - by BarFix - 21.12.2013, 12:13
Re: Possibe? - by Voxel - 21.12.2013, 12:25
Re: Possibe? - by Patrick - 21.12.2013, 12:26
Re: Possibe? - by BarFix - 21.12.2013, 12:53
Re: Possibe? - by Patrick - 21.12.2013, 12:55
Re: Possibe? - by BarFix - 21.12.2013, 13:09
Re: Possibe? - by Babul - 21.12.2013, 14:47
Re: Possibe? - by SilentSoul - 21.12.2013, 14:49

Forum Jump:


Users browsing this thread: 2 Guest(s)