#10

Here:

pawn Код:
new HuntID[MAX_PLAYERS];
new IsHunting[MAX_PLAYERS];

OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/mission", true))
    {
        new
            Msg[19];
        HuntID[playerid] = random(GetMaxPlayers());
        while(HuntID[playerid] == playerid || !IsPlayerConnected(HuntID[playerid])) HuntID[playerid] = random(GetMaxPlayers());
        format(Msg, 19, "You are now hunting for ID %i.", HuntID[playerid]);
        SendClientMessage(playerid, 0xFFFF00FF, Msg);
        IsHunting[playerid] = 1;
        return 1;
    }
    return 0;
}

OnPlayerDeath(playerid, killerid, reason)
{
    if(IsHunting[killerid] == 1 && HuntID[killerid] == playerid)
    {
        SendClientMessage(killer, 0xFFFF00FF, "You have successfully carried out the mission and have been awarded $5000!");
        GivePlayerMoney(killerid, 5000);
    }
    return 1;
}
Reply


Messages In This Thread
ID 0 - by Headshot1108 - 14.03.2009, 16:06
Re: ID 0 - by Weirdosport - 14.03.2009, 16:10
Re: ID 0 - by Headshot1108 - 14.03.2009, 16:10
Re: ID 0 - by Weirdosport - 14.03.2009, 16:16
Re: ID 0 - by introzen - 14.03.2009, 16:17
Re: ID 0 - by Mikep - 14.03.2009, 16:19
Re: ID 0 - by Weirdosport - 14.03.2009, 16:20
Re: ID 0 - by Headshot1108 - 14.03.2009, 16:28
Re: ID 0 - by Weirdosport - 14.03.2009, 16:32
Re: ID 0 - by Ghett0 - 14.03.2009, 16:44

Forum Jump:


Users browsing this thread: 1 Guest(s)