Hide message(s)
#1

^^^^^^^^
Reply
#2

In OnPlayerDeaath, add a conditional statement around the death message verifying that the player is not in minigun area.

Example.
pawn Код:
public OnPlayerDeath(playerid,killerid,reason)
{
    if(MiniGun[playerid] != 1)
    {
       SendDeathMessage(killerid, playerid, reason);
    }
    return 1;
}
Reply
#3

^^^^^^^^
Reply
#4

Post what you've tried..
Reply
#5

This is only for the unfair kill (I need your code to make the rest).
Код:
new GetWeapon[][32] = {
	{"Unarmed (Fist)"},               //|    0     |
	{"Brass Knuckles"},               //|    1     |
	{"Golf Club"},                    //|    2     |
	{"Night Stick"},                  //|    3     |
	{"Knife"},                        //|    4     |
	{"Baseball Bat"},                 //|    5     |
	{"Shovel"},                       //|    6     |
	{"Pool Cue"},                     //|    7     |
	{"Katana"},                       //|    8     |
	{"Chainsaw"},                     //|    9     |
	{"Purple Dildo"},                 //|    10    |
	{"Big White Vibrator"},           //|    11    |
	{"Medium White Vibrator"},        //|    12    |
	{"Small White Vibrator"},         //|    13    |
	{"Flowers"},                      //|    14    |
	{"Cane"},                         //|    15    |
	{"Grenade"},                      //|    16    |
	{"Teargas"},                      //|    17    |
	{"Molotov"},                      //|    18    |
	{" "},                            //|    19    |
	{" "},                            //|    20    |
	{" "},                            //|    21    |
	{"Colt 45"},                      //|    22    |
	{"Colt 45 (Silenced)"},           //|    23    |
	{"Desert Eagle"},                 //|    24    |
	{"Normal Shotgun"},               //|    25    |
	{"Sawnoff Shotgun"},              //|    26    |
	{"Combat Shotgun"},               //|    27    |
	{"Micro Uzi (Mac 10)"},           //|    28    |
	{"MP5"},                          //|    29    |
	{"AK47"},                         //|    30    |
	{"M4"},                           //|    31    |
	{"Tec9"},                         //|    32    |
	{"Country Rifle"},                //|    33    |
	{"Sniper Rifle"},                 //|    34    |
	{"Rocket Launcher"},              //|    35    |
	{"Heat-Seeking Rocket Launcher"}, //|    36    |
	{"Flamethrower"},                 //|    37    |
	{"Minigun"},                      //|    38    |
	{"Satchel Charge"},               //|    39    |
	{"Detonator"},                    //|    40    |
	{"Spray Can"},                    //|    41    |
	{"Fire Extinguisher"},            //|    42    |
	{"Camera"},                       //|    43    |
	{"Night Vision Goggles"},         //|    44    |
	{"Infrared Vision Goggles"},      //|    45    |
	{"Parachute"},                    //|    46    |
	{"Fake Pistol"},                  //|    47    |
	{"Unknown"},                      //|    48    |
	{"Vehicle"},                      //|    49    |
	{"Helicopter Blades"},            //|    50    |
	{"Explosion"},                    //|    51    |
	{"Unknown"},                      //|    52    |
	{"Drowned"},                      //|    53    |
	{"Explosion"}                     //|    54    |
};

public OnPlayerDeath(playerid,killerid,reason)
{
    if(GetWeapon == 38)
    {
         new string[100];
         new name[24];
	 new killername[24];
	 GetPlayerName(playerid,name,sizeof(name));
	 GetPlayerName(killerid,killername,sizeof(killername));
         format(string, sizeof(string), "{AAAAAA}%s (%d) got killed by %s (%d) with a minigun - Unfair kill (No stats were modified).", name, playerid, killername, killerid);
         SendClientMessageToAll(COLOR_WHITE, string);
         return 0;
    }
    return 0;
}
Reply
#6

Change MiniGun[playerid] to your Minigun variable ( how you check if player is in minigun or not)

If you can't figure out the variable, post part of your code of the minigun.
pawn Код:
public OnPlayerDeath(playerid,killerid,reason)
{

    if(MiniGun[playerid] != 1)
    if(GetWeapon == 38)
    {
        new string[100],name[24],killername[24];
        GetPlayerName(playerid,name,sizeof(name));
        GetPlayerName(killerid,killername,sizeof(killername));
        format(string, sizeof(string), "{AAAAAA}%s (%d) got killed by %s (%d) with a minigun - Unfair kill (No stats were modified).", name, playerid, killername, killerid);
        SendClientMessageToAll(COLOR_WHITE, string);
        return 0;
    }
    return 0;
}
Reply
#7

^^^^^^^^
Reply
#8

Here:

Код:
new GetWeapon[][32] = {
	{"Unarmed (Fist)"},               //|    0     |
	{"Brass Knuckles"},               //|    1     |
	{"Golf Club"},                    //|    2     |
	{"Night Stick"},                  //|    3     |
	{"Knife"},                        //|    4     |
	{"Baseball Bat"},                 //|    5     |
	{"Shovel"},                       //|    6     |
	{"Pool Cue"},                     //|    7     |
	{"Katana"},                       //|    8     |
	{"Chainsaw"},                     //|    9     |
	{"Purple Dildo"},                 //|    10    |
	{"Big White Vibrator"},           //|    11    |
	{"Medium White Vibrator"},        //|    12    |
	{"Small White Vibrator"},         //|    13    |
	{"Flowers"},                      //|    14    |
	{"Cane"},                         //|    15    |
	{"Grenade"},                      //|    16    |
	{"Teargas"},                      //|    17    |
	{"Molotov"},                      //|    18    |
	{" "},                            //|    19    |
	{" "},                            //|    20    |
	{" "},                            //|    21    |
	{"Colt 45"},                      //|    22    |
	{"Colt 45 (Silenced)"},           //|    23    |
	{"Desert Eagle"},                 //|    24    |
	{"Normal Shotgun"},               //|    25    |
	{"Sawnoff Shotgun"},              //|    26    |
	{"Combat Shotgun"},               //|    27    |
	{"Micro Uzi (Mac 10)"},           //|    28    |
	{"MP5"},                          //|    29    |
	{"AK47"},                         //|    30    |
	{"M4"},                           //|    31    |
	{"Tec9"},                         //|    32    |
	{"Country Rifle"},                //|    33    |
	{"Sniper Rifle"},                 //|    34    |
	{"Rocket Launcher"},              //|    35    |
	{"Heat-Seeking Rocket Launcher"}, //|    36    |
	{"Flamethrower"},                 //|    37    |
	{"Minigun"},                      //|    38    |
	{"Satchel Charge"},               //|    39    |
	{"Detonator"},                    //|    40    |
	{"Spray Can"},                    //|    41    |
	{"Fire Extinguisher"},            //|    42    |
	{"Camera"},                       //|    43    |
	{"Night Vision Goggles"},         //|    44    |
	{"Infrared Vision Goggles"},      //|    45    |
	{"Parachute"},                    //|    46    |
	{"Fake Pistol"},                  //|    47    |
	{"Unknown"},                      //|    48    |
	{"Vehicle"},                      //|    49    |
	{"Helicopter Blades"},            //|    50    |
	{"Explosion"},                    //|    51    |
	{"Unknown"},                      //|    52    |
	{"Drowned"},                      //|    53    |
	{"Explosion"}                     //|    54    |
};

public OnPlayerDeath(playerid,killerid,reason)
{
    new string[503];
    new name[24];
    new killername[24];
    GetPlayerName(playerid,name,sizeof(name));
    GetPlayerName(killerid,killername,sizeof(killername));
    isDead[playerid] = 1;
    if(InDMS[playerid] == 0)
    {
         if(GetWeapon == 38)
        {
             format(string, sizeof(string), "{AAAAAA}%s (%d) got killed by %s (%d) with a minigun - Unfair kill (No stats were modified).", name, playerid, killername, killerid);
             SendClientMessageToAll(0xFFFFFFFF, string);
             return 0;
        }
    }
    if(InDMS[playerid] == 1)
    {
        new Random = random(sizeof(RandomDMSpawns));
        SendDeathMessage(killerid, playerid, reason);
        SetPlayerPos(playerid, RandomDMSpawns[Random][0], RandomDMSpawns[Random][1], RandomDMSpawns[Random][2]);
        SetPlayerFacingAngle(playerid, RandomDMSpawns[Random][3]);
    }
    SetPlayerScore(playerid, GetPlayerScore(playerid) -1);
    SetPlayerScore(killerid, GetPlayerScore(killerid) +1);
    KillingSpree[killerid] ++;
    KillingSpree[playerid] = 0;
    if(IsPlayerConnected(killerid) && killerid != INVALID_PLAYER_ID)
    {
       format(string, sizeof(string), "{AAAAAA}%s (%d) got killed by %s (%d) with a %s.", name, playerid, killername, ,killerid, GetWeapon);
       SendClientMessageToAll(0xFFFFFFFF, string);
    }
    return 0;
}
Reply
#9

pawn Код:
new InMiniGunArea[MAX_PLAYERS]; //Make a global variable..

// Under OnPlayerDeath ;
    if(InMiniGunArea[playerid]) return 1; //If he's in minigun area, Do nothing...
   
    new kName[128];
    new string[503];
    new pID;
    isDead[playerid] = 1;
    SetPlayerScore(playerid, GetPlayerScore(playerid) -1);
    SetPlayerScore(killerid, GetPlayerScore(killerid) +1);
    KillingSpree[killerid] ++;
    KillingSpree[playerid] = 0;
    if(IsPlayerConnected(killerid) && killerid != INVALID_PLAYER_ID)
    {
    new WeapName[32], Name[MAX_PLAYER_NAME], KillerName[MAX_PLAYER_NAME];
    GetWeaponName(reason, WeapName, sizeof(WeapName));
    GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
    GetPlayerName(killerid, KillerName, MAX_PLAYER_NAME);
    format(string, sizeof(string),"%s (%d) Has Killed %s (%d) With A %s. ", KillerName, playerid, Name, pID, WeapName);
    SendClientMessageToAll(COLOR_DARKRED, string);
    }

    if(InDMS[playerid] == 1)
    {
        new Random = random(sizeof(RandomDMSpawns));
        SendDeathMessage(killerid, playerid, reason);
        SetPlayerPos(playerid, RandomDMSpawns[Random][0], RandomDMSpawns[Random][1], RandomDMSpawns[Random][2]);
        SetPlayerFacingAngle(playerid, RandomDMSpawns[Random][3]);
    }
   
   
   

OnPlayerJoinMiniGunArea(playerid) //Replace it with your command/function
{
    InMiniGunArea[playerid] = true;
}
OnPlayerLeaveMiniGunArea(playerid) //Replace it with your command/function
{
    InMiniGunArea[playerid] = false;
}
Reply
#10

^^^^^^^^
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)