Command Like /allhunt
#1

Im looking for a hunted system like Horzion for anyone who doesnt know what this is I will explain it.

SO an admin does /allhunt <playername/id>

this then sends an announcement in chat saying "The Hunt is on Kill PLAYER"

the player health and armor gets set to 100

Once the player is killed they respawn where they was before the admin did /allhunt and keeps all weapons they had before. The person who then killed the Hunted gets giving random prize aka Money, Drugs,Materials. /allhunt can only be done once every 2 hours unless a Level 5 admin does /huntreset

Anyone able to help me with this??
Reply
#2

pawn Код:
new
        bool:Hunt[ MAX_PLAYERS ]
;
public OnPlayerConnect(playerid)
{
    Hunt[ playerid ] = false;
    return 1;
}

CMD:allhunt( playerid, params[] )
{
    new
            id, str[ 144 ], name[ MAX_PLAYER_NAME - 1 ]
    ;
    if( sscanf( params, "u", id ) ) return SendClientMessage( playerid , -1 , "Syntax: /allhunt <playerid/name>" );
    if( !IsPlayerConnected( id ) ) return SendClientMessage ( playerid, -1, "Player is not connected" );
    if( Hunt [ id ] == true ) return SendClientMessage( playerid, -1, "Already activated." );
    GetPlayerName( id, name, sizeof( name ) ) ;
    Hunt[ id ] = true;
    SetPlayerHealth( id, 100 ) ;
    SetPlayerArmour( id , 100 );
    format( str, sizeof( str ) , "All hunt %s..", name );
    SendClientMessageToAll( -1 , str ) ;
    return true;
}
public OnPlayerDeath(playerid, killerid, reason)
{
    if( Hunt[ playerid ] == true )
    {
        GivePlayerMoney( killerid, 100 ); //Give him the reward you want.
        Hunt[ playerid ] = false;
    }
    return 1;
}
I just gave you the basic idea, you may search for other stuff and make it yourself. you may search for the gettime() function to make it available for use every 2 hours.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)