Public for player hit?
#7

Quote:
Originally Posted by tamirshoval
Посмотреть сообщение
Ok,but shouldnt i add the var of the Police (if police = 2 they will see it?)
Uh, what do you mean?

By the way, in-case you didn't notice, i updated it.
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    if(issuerid != INVALID_PLAYER_ID) // If not self-inflicted
    {
        new
            infoString[128],
            weaponName[24],
            victimName[MAX_PLAYER_NAME],
            attackerName[MAX_PLAYER_NAME];
 
        GetPlayerName(playerid, victimName, sizeof (victimName));
        GetPlayerName(issuerid, attackerName, sizeof (attackerName));
 
        format(infoString, sizeof(infoString),  "[DISPATCH] - %s has attacked %s | weapon: %s | damage: %.0f |", attackerName, victimName, weaponName, amount);
        //Command that will send the message to the cops, for an ex: SendMessageToCops, or w.e you have!
        SetPlayerWantedLevel(issuerid, GetPlayerWantedLevel(issuerid) +1); //This will set the players(attackers, issuers) wanted level to +1, when he has attacked somebody
       }
     return 1;
}
But still, it's not tested.
Is the "var of the Police" the thing ,that allows cops to see the message? For an example - Cop Radio, Robberies etc..?
Reply


Messages In This Thread
Public for player hit? - by tamirshoval - 13.12.2013, 16:22
Re: Public for player hit? - by Kyance - 13.12.2013, 16:35
Re: Public for player hit? - by erminpr0 - 13.12.2013, 16:36
Re: Public for player hit? - by tamirshoval - 13.12.2013, 16:48
Re: Public for player hit? - by Kyance - 13.12.2013, 16:51
Re: Public for player hit? - by tamirshoval - 13.12.2013, 16:58
Re: Public for player hit? - by Kyance - 13.12.2013, 17:00
Re: Public for player hit? - by Kyance - 13.12.2013, 17:07
Re: Public for player hit? - by tamirshoval - 13.12.2013, 17:10
Re: Public for player hit? - by Kyance - 13.12.2013, 17:18

Forum Jump:


Users browsing this thread: