PDA

View Full Version : OnPlayerDeath


Djumza
06/06/2012, 03:26 PM
Okey here is part of script:
public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid, playerid, reason);

new deathreason[32];
if(reason == 0) {format(deathreason, sizeof(deathreason), "Fists");}
if(reason == 1) {format(deathreason, sizeof(deathreason), "Brass Knuckles");}
if(reason == 2) {format(deathreason, sizeof(deathreason), "Golf Stick");}
if(reason == 3) {format(deathreason, sizeof(deathreason), "Cop Stick");}
if(reason == 4) {format(deathreason, sizeof(deathreason), "Knife");}
if(reason == 5) {format(deathreason, sizeof(deathreason), "Baseball Bat");}
if(reason == 6) {format(deathreason, sizeof(deathreason), "Shovel");}
if(reason == 7) {format(deathreason, sizeof(deathreason), "Pool Cue");}
if(reason == 8) {format(deathreason, sizeof(deathreason), "Katana");}
if(reason == 9) {format(deathreason, sizeof(deathreason), "Chainsaw");}
if(reason == 10){format(deathreason, sizeof(deathreason), "Dildo");}
if(reason == 11){format(deathreason, sizeof(deathreason), "Small Vibrator");}
if(reason == 12){format(deathreason, sizeof(deathreason), "Large Vibrator");}
if(reason == 13){format(deathreason, sizeof(deathreason), "Vibrator");}
if(reason == 14){format(deathreason, sizeof(deathreason), "Flowers");}
if(reason == 15){format(deathreason, sizeof(deathreason), "Cane");}
if(reason == 16){format(deathreason, sizeof(deathreason), "Grenade");}
if(reason == 17){format(deathreason, sizeof(deathreason), "Smoke Grenade");}
if(reason == 18){format(deathreason, sizeof(deathreason), "Molotov Cocktail");}
if(reason == 19){format(deathreason, sizeof(deathreason), "Vehicle Weapon");}
if(reason == 20){format(deathreason, sizeof(deathreason), "Hydra Flare");}
if(reason == 21){format(deathreason, sizeof(deathreason), "Jetpack");}
if(reason == 22){format(deathreason, sizeof(deathreason), "9mm");}
if(reason == 23){format(deathreason, sizeof(deathreason), "Silenced 9mm");}
if(reason == 24){format(deathreason, sizeof(deathreason), "Desert Eagle");}
if(reason == 25){format(deathreason, sizeof(deathreason), "Shotgun");}
if(reason == 26){format(deathreason, sizeof(deathreason), "Sawnoff Shotgun");}
if(reason == 27){format(deathreason, sizeof(deathreason), "Combat Shotgun");}
if(reason == 28){format(deathreason, sizeof(deathreason), "Micro SMG");}
if(reason == 29){format(deathreason, sizeof(deathreason), "MP5");}
if(reason == 30){format(deathreason, sizeof(deathreason), "AK47");}
if(reason == 31){format(deathreason, sizeof(deathreason), "M4");}
if(reason == 32){format(deathreason, sizeof(deathreason), "Tec-9");}
if(reason == 33){format(deathreason, sizeof(deathreason), "Rifle");}
if(reason == 34){format(deathreason, sizeof(deathreason), "Sniper Rifle");}
if(reason == 35){format(deathreason, sizeof(deathreason), "Rocket Launcherr");}
if(reason == 36){format(deathreason, sizeof(deathreason), "Rocket Launcher");}
if(reason == 37){format(deathreason, sizeof(deathreason), "Flamethrower");}
if(reason == 38){format(deathreason, sizeof(deathreason), "Minigun");}
if(reason == 39){format(deathreason, sizeof(deathreason), "Backpack Bomb");}
if(reason == 40){format(deathreason, sizeof(deathreason), "Detonator");}
if(reason == 41){format(deathreason, sizeof(deathreason), "Spraycan");}
if(reason == 42){format(deathreason, sizeof(deathreason), "Fire Extinguisher");}
if(reason == 43){format(deathreason, sizeof(deathreason), "Camera");}
if(reason == 44){format(deathreason, sizeof(deathreason), "Nightvision Goggles");}
if(reason == 45){format(deathreason, sizeof(deathreason), "Infrared Goggles");}
if(reason == 46){format(deathreason, sizeof(deathreason), "Parachute");}
if(reason == 47){format(deathreason, sizeof(deathreason), "!>>> Unknown 47 <<<!");}
if(reason == 48){format(deathreason, sizeof(deathreason), "!>>> Unknown 48 <<<!");}
if(reason == 49){format(deathreason, sizeof(deathreason), "Vehicle");}
if(reason == 50){format(deathreason, sizeof(deathreason), "Helicopter Blades");}
if(reason == 51){format(deathreason, sizeof(deathreason), "Explosion");}
if(reason == 52){format(deathreason, sizeof(deathreason), "!>>> Unknown 52 <<<!");}
if(reason == 53){format(deathreason, sizeof(deathreason), "Drowned");}
if(reason == 54){format(deathreason, sizeof(deathreason), "Splat");}
if(reason == 55){format(deathreason, sizeof(deathreason), "!>>> Unknown 55 <<<!");}
if(reason == 255){format(deathreason, sizeof(deathreason), "Died");}

if(gTeam[killerid] == TEAM_COP || TEAM_ARMY)
{
new pc = GetPlayerColor(playerid);
if(pc == COLOR_WHITE)
{
SendClientMessage(killerid,COLOR_RED,"You've killed a innocent player!!!");
GivePlayerMoney(killerid,-3000);
SetPlayerScore(killerid, GetPlayerScore(killerid) - 3);
}
else if(pc == COLOR_PURPLE)
{
SendClientMessage(killerid,COLOR_RED,"Purple players needs to be arrested!!!");
GivePlayerMoney(killerid,-1500);
SetPlayerScore(killerid, GetPlayerScore(killerid) - 1);
}
else
{
GivePlayerMoney(killerid,3000);
SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
}
}
if(gTeam[killerid] != TEAM_COP || TEAM_ARMY)
{
SetPlayerColor(killerid,COLOR_RED);
SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
if(GetPlayerWantedLevel(killerid) < 4)
{
SetPlayerWantedLevel(killerid,4);
}
}
SetPlayerWantedLevel(playerid,0);

return 1;
}

and
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
if(gTeam[playerid] == TEAM_COP || TEAM_ARMY)
{
}
if(gTeam[playerid] != TEAM_COP || TEAM_ARMY)
{
if(GetPlayerWantedLevel(playerid) == 0)
{
SetPlayerWantedLevel(playerid,1);
SendClientMessage(playerid,COLOR_RED,"You are now wanted player ! ");
SetPlayerColor(playerid,COLOR_PURPLE);
}
else
{
}
}
return 1;
}

Everything is mashed up !! when cop shoot someone, he changes color to purple o.O and he gets stars !! When civilian kill purple cop, they get warning msg for killing purple player ... :D
I think its written good.. there is no warnings or errors ofc.
Please help out, thanks :)

MadeMan
06/06/2012, 03:38 PM
if(gTeam[playerid] == TEAM_COP || TEAM_ARMY)

You can't compare it like that


if(gTeam[playerid] == TEAM_COP || gTeam[playerid] == TEAM_ARMY)

Djumza
06/06/2012, 04:21 PM
Done, but not working,still same story.

MadeMan
06/06/2012, 04:51 PM
Did you change all of them?

Djumza
07/06/2012, 04:51 AM
Yeap,here's part:
public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid, playerid, reason);

new deathreason[32];
if(reason == 0) {format(deathreason, sizeof(deathreason), "Fists");}
if(reason == 1) {format(deathreason, sizeof(deathreason), "Brass Knuckles");}
if(reason == 2) {format(deathreason, sizeof(deathreason), "Golf Stick");}
if(reason == 3) {format(deathreason, sizeof(deathreason), "Cop Stick");}
if(reason == 4) {format(deathreason, sizeof(deathreason), "Knife");}
if(reason == 5) {format(deathreason, sizeof(deathreason), "Baseball Bat");}
if(reason == 6) {format(deathreason, sizeof(deathreason), "Shovel");}
if(reason == 7) {format(deathreason, sizeof(deathreason), "Pool Cue");}
if(reason == 8) {format(deathreason, sizeof(deathreason), "Katana");}
if(reason == 9) {format(deathreason, sizeof(deathreason), "Chainsaw");}
if(reason == 10){format(deathreason, sizeof(deathreason), "Dildo");}
if(reason == 11){format(deathreason, sizeof(deathreason), "Small Vibrator");}
if(reason == 12){format(deathreason, sizeof(deathreason), "Large Vibrator");}
if(reason == 13){format(deathreason, sizeof(deathreason), "Vibrator");}
if(reason == 14){format(deathreason, sizeof(deathreason), "Flowers");}
if(reason == 15){format(deathreason, sizeof(deathreason), "Cane");}
if(reason == 16){format(deathreason, sizeof(deathreason), "Grenade");}
if(reason == 17){format(deathreason, sizeof(deathreason), "Smoke Grenade");}
if(reason == 18){format(deathreason, sizeof(deathreason), "Molotov Cocktail");}
if(reason == 19){format(deathreason, sizeof(deathreason), "Vehicle Weapon");}
if(reason == 20){format(deathreason, sizeof(deathreason), "Hydra Flare");}
if(reason == 21){format(deathreason, sizeof(deathreason), "Jetpack");}
if(reason == 22){format(deathreason, sizeof(deathreason), "9mm");}
if(reason == 23){format(deathreason, sizeof(deathreason), "Silenced 9mm");}
if(reason == 24){format(deathreason, sizeof(deathreason), "Desert Eagle");}
if(reason == 25){format(deathreason, sizeof(deathreason), "Shotgun");}
if(reason == 26){format(deathreason, sizeof(deathreason), "Sawnoff Shotgun");}
if(reason == 27){format(deathreason, sizeof(deathreason), "Combat Shotgun");}
if(reason == 28){format(deathreason, sizeof(deathreason), "Micro SMG");}
if(reason == 29){format(deathreason, sizeof(deathreason), "MP5");}
if(reason == 30){format(deathreason, sizeof(deathreason), "AK47");}
if(reason == 31){format(deathreason, sizeof(deathreason), "M4");}
if(reason == 32){format(deathreason, sizeof(deathreason), "Tec-9");}
if(reason == 33){format(deathreason, sizeof(deathreason), "Rifle");}
if(reason == 34){format(deathreason, sizeof(deathreason), "Sniper Rifle");}
if(reason == 35){format(deathreason, sizeof(deathreason), "Rocket Launcherr");}
if(reason == 36){format(deathreason, sizeof(deathreason), "Rocket Launcher");}
if(reason == 37){format(deathreason, sizeof(deathreason), "Flamethrower");}
if(reason == 38){format(deathreason, sizeof(deathreason), "Minigun");}
if(reason == 39){format(deathreason, sizeof(deathreason), "Backpack Bomb");}
if(reason == 40){format(deathreason, sizeof(deathreason), "Detonator");}
if(reason == 41){format(deathreason, sizeof(deathreason), "Spraycan");}
if(reason == 42){format(deathreason, sizeof(deathreason), "Fire Extinguisher");}
if(reason == 43){format(deathreason, sizeof(deathreason), "Camera");}
if(reason == 44){format(deathreason, sizeof(deathreason), "Nightvision Goggles");}
if(reason == 45){format(deathreason, sizeof(deathreason), "Infrared Goggles");}
if(reason == 46){format(deathreason, sizeof(deathreason), "Parachute");}
if(reason == 47){format(deathreason, sizeof(deathreason), "!>>> Unknown 47 <<<!");}
if(reason == 48){format(deathreason, sizeof(deathreason), "!>>> Unknown 48 <<<!");}
if(reason == 49){format(deathreason, sizeof(deathreason), "Vehicle");}
if(reason == 50){format(deathreason, sizeof(deathreason), "Helicopter Blades");}
if(reason == 51){format(deathreason, sizeof(deathreason), "Explosion");}
if(reason == 52){format(deathreason, sizeof(deathreason), "!>>> Unknown 52 <<<!");}
if(reason == 53){format(deathreason, sizeof(deathreason), "Drowned");}
if(reason == 54){format(deathreason, sizeof(deathreason), "Splat");}
if(reason == 55){format(deathreason, sizeof(deathreason), "!>>> Unknown 55 <<<!");}
if(reason == 255){format(deathreason, sizeof(deathreason), "Died");}

if(gTeam[playerid] == TEAM_COP || gTeam[playerid] == TEAM_ARMY)
{
new pc = GetPlayerColor(playerid);
if(pc == COLOR_WHITE)
{
SendClientMessage(killerid,COLOR_RED,"You've killed a innocent player!!!");
GivePlayerMoney(killerid,-3000);
SetPlayerScore(killerid, GetPlayerScore(killerid) - 3);
}
else if(pc == COLOR_PURPLE)
{
SendClientMessage(killerid,COLOR_RED,"Purple players needs to be arrested!!!");
GivePlayerMoney(killerid,-1500);
SetPlayerScore(killerid, GetPlayerScore(killerid) - 1);
}
else
{
GivePlayerMoney(killerid,3000);
SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
}
}
if(gTeam[playerid] != TEAM_COP || gTeam[playerid] != TEAM_ARMY)
{
SetPlayerColor(killerid,COLOR_RED);
SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
if(GetPlayerWantedLevel(killerid) < 4)
{
SetPlayerWantedLevel(killerid,4);
}
}
SetPlayerWantedLevel(playerid,0);

return 1;
}


public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
if(gTeam[playerid] == TEAM_COP || TEAM_ARMY)
{
}
if(gTeam[playerid] != TEAM_COP || TEAM_ARMY)
{
if(GetPlayerWantedLevel(playerid) == 0)
{
SetPlayerWantedLevel(playerid,1);
SendClientMessage(playerid,COLOR_RED,"You are now wanted player ! ");
SetPlayerColor(playerid,COLOR_PURPLE);
}
else
{
}
}
return 1;
}



EDIT:Ohh now i saw it ...
if(gTeam[playerid] == TEAM_COP || TEAM_ARMY)
{
}
if(gTeam[playerid] != TEAM_COP || TEAM_ARMY)

Ill fix it, and test it.

zDevon
07/06/2012, 04:56 AM
There is an exclamation mark instead of an equals sign in your OnPlayerGiveDamage.

public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
if(gTeam[playerid] == TEAM_COP || TEAM_ARMY)
{
}
if(gTeam[playerid] == TEAM_COP || TEAM_ARMY)
{
if(GetPlayerWantedLevel(playerid) == 0)
{
SetPlayerWantedLevel(playerid,1);
SendClientMessage(playerid,COLOR_RED,"You are now wanted player ! ");
SetPlayerColor(playerid,COLOR_PURPLE);
}
}
else
{
}
return 1;
}

Edit: You found it.

Shaneisace
07/06/2012, 07:13 AM
There is an exclamation mark instead of an equals sign in your OnPlayerGiveDamage.

public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
if(gTeam[playerid] == TEAM_COP || TEAM_ARMY)
{
}
if(gTeam[playerid] == TEAM_COP || TEAM_ARMY)
{
if(GetPlayerWantedLevel(playerid) == 0)
{
SetPlayerWantedLevel(playerid,1);
SendClientMessage(playerid,COLOR_RED,"You are now wanted player ! ");
SetPlayerColor(playerid,COLOR_PURPLE);
}
}
else
{
}
return 1;
}

Edit: You found it.

Here he's using a Value there that isn't even needed "waste of space" and which is why it causes issues to the on damage


public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
/*if(gTeam[playerid] == TEAM_COP || TEAM_ARMY)
{
}*/
// No point in the above code since there is nothing to return as we will edit below this to return the correct value
//if(gTeam[playerid] == TEAM_COP || TEAM_ARMY) // when using "||" your telling the code to return the Value to either Team which i guess you don't want to do, so now we need to make it "If isn't TEAM_COP" but is "TEAM_ARMY" this is what you do below
if(gTeam[playerid] != TEAM_COP) // So now if the player isn't listed as "TEAM_COP" it will apply the below code to any other TEAM made
{
if(GetPlayerWantedLevel(playerid) == 0)
{
SetPlayerWantedLevel(playerid,1);
SendClientMessage(playerid,COLOR_RED,"You are now wanted player ! ");
SetPlayerColor(playerid,COLOR_PURPLE);
}
}
return 1;
}

I only did // to explain what changes i made and so you can understand what i did for the "OnPlayerGiveDamage".

Djumza
07/06/2012, 06:16 PM
Not working with these lines:
public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid, playerid, reason);

new deathreason[32];
if(reason == 0) {format(deathreason, sizeof(deathreason), "Fists");}
if(reason == 1) {format(deathreason, sizeof(deathreason), "Brass Knuckles");}
if(reason == 2) {format(deathreason, sizeof(deathreason), "Golf Stick");}
if(reason == 3) {format(deathreason, sizeof(deathreason), "Cop Stick");}
if(reason == 4) {format(deathreason, sizeof(deathreason), "Knife");}
if(reason == 5) {format(deathreason, sizeof(deathreason), "Baseball Bat");}
if(reason == 6) {format(deathreason, sizeof(deathreason), "Shovel");}
if(reason == 7) {format(deathreason, sizeof(deathreason), "Pool Cue");}
if(reason == 8) {format(deathreason, sizeof(deathreason), "Katana");}
if(reason == 9) {format(deathreason, sizeof(deathreason), "Chainsaw");}
if(reason == 10){format(deathreason, sizeof(deathreason), "Dildo");}
if(reason == 11){format(deathreason, sizeof(deathreason), "Small Vibrator");}
if(reason == 12){format(deathreason, sizeof(deathreason), "Large Vibrator");}
if(reason == 13){format(deathreason, sizeof(deathreason), "Vibrator");}
if(reason == 14){format(deathreason, sizeof(deathreason), "Flowers");}
if(reason == 15){format(deathreason, sizeof(deathreason), "Cane");}
if(reason == 16){format(deathreason, sizeof(deathreason), "Grenade");}
if(reason == 17){format(deathreason, sizeof(deathreason), "Smoke Grenade");}
if(reason == 18){format(deathreason, sizeof(deathreason), "Molotov Cocktail");}
if(reason == 19){format(deathreason, sizeof(deathreason), "Vehicle Weapon");}
if(reason == 20){format(deathreason, sizeof(deathreason), "Hydra Flare");}
if(reason == 21){format(deathreason, sizeof(deathreason), "Jetpack");}
if(reason == 22){format(deathreason, sizeof(deathreason), "9mm");}
if(reason == 23){format(deathreason, sizeof(deathreason), "Silenced 9mm");}
if(reason == 24){format(deathreason, sizeof(deathreason), "Desert Eagle");}
if(reason == 25){format(deathreason, sizeof(deathreason), "Shotgun");}
if(reason == 26){format(deathreason, sizeof(deathreason), "Sawnoff Shotgun");}
if(reason == 27){format(deathreason, sizeof(deathreason), "Combat Shotgun");}
if(reason == 28){format(deathreason, sizeof(deathreason), "Micro SMG");}
if(reason == 29){format(deathreason, sizeof(deathreason), "MP5");}
if(reason == 30){format(deathreason, sizeof(deathreason), "AK47");}
if(reason == 31){format(deathreason, sizeof(deathreason), "M4");}
if(reason == 32){format(deathreason, sizeof(deathreason), "Tec-9");}
if(reason == 33){format(deathreason, sizeof(deathreason), "Rifle");}
if(reason == 34){format(deathreason, sizeof(deathreason), "Sniper Rifle");}
if(reason == 35){format(deathreason, sizeof(deathreason), "Rocket Launcherr");}
if(reason == 36){format(deathreason, sizeof(deathreason), "Rocket Launcher");}
if(reason == 37){format(deathreason, sizeof(deathreason), "Flamethrower");}
if(reason == 38){format(deathreason, sizeof(deathreason), "Minigun");}
if(reason == 39){format(deathreason, sizeof(deathreason), "Backpack Bomb");}
if(reason == 40){format(deathreason, sizeof(deathreason), "Detonator");}
if(reason == 41){format(deathreason, sizeof(deathreason), "Spraycan");}
if(reason == 42){format(deathreason, sizeof(deathreason), "Fire Extinguisher");}
if(reason == 43){format(deathreason, sizeof(deathreason), "Camera");}
if(reason == 44){format(deathreason, sizeof(deathreason), "Nightvision Goggles");}
if(reason == 45){format(deathreason, sizeof(deathreason), "Infrared Goggles");}
if(reason == 46){format(deathreason, sizeof(deathreason), "Parachute");}
if(reason == 47){format(deathreason, sizeof(deathreason), "!>>> Unknown 47 <<<!");}
if(reason == 48){format(deathreason, sizeof(deathreason), "!>>> Unknown 48 <<<!");}
if(reason == 49){format(deathreason, sizeof(deathreason), "Vehicle");}
if(reason == 50){format(deathreason, sizeof(deathreason), "Helicopter Blades");}
if(reason == 51){format(deathreason, sizeof(deathreason), "Explosion");}
if(reason == 52){format(deathreason, sizeof(deathreason), "!>>> Unknown 52 <<<!");}
if(reason == 53){format(deathreason, sizeof(deathreason), "Drowned");}
if(reason == 54){format(deathreason, sizeof(deathreason), "Splat");}
if(reason == 55){format(deathreason, sizeof(deathreason), "!>>> Unknown 55 <<<!");}
if(reason == 255){format(deathreason, sizeof(deathreason), "Died");}

if(gTeam[playerid] == TEAM_COP || gTeam[playerid] == TEAM_ARMY)
{
new pc = GetPlayerColor(playerid);
if(pc == COLOR_WHITE)
{
SendClientMessage(killerid,COLOR_RED,"You've killed a innocent player!!!");
GivePlayerMoney(killerid,-3000);
SetPlayerScore(killerid, GetPlayerScore(killerid) - 3);
}
else if(pc == COLOR_PURPLE)
{
SendClientMessage(killerid,COLOR_RED,"Purple players needs to be arrested!!!");
GivePlayerMoney(killerid,-1500);
SetPlayerScore(killerid, GetPlayerScore(killerid) - 1);
}
else
{
GivePlayerMoney(killerid,3000);
SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
}
}
if(gTeam[playerid] != TEAM_COP || gTeam[playerid] != TEAM_ARMY)
{
SetPlayerColor(killerid,COLOR_RED);
SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
if(GetPlayerWantedLevel(killerid) < 4)
{
SetPlayerWantedLevel(killerid,4);
}
}
SetPlayerWantedLevel(playerid,0);

return 1;
}


public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
if(gTeam[playerid] == TEAM_COP || gTeam[playerid] == TEAM_ARMY)
{
}
if(gTeam[playerid] != TEAM_COP || gTeam[playerid] != TEAM_ARMY)
{
if(GetPlayerWantedLevel(playerid) == 0)
{
SetPlayerWantedLevel(playerid,1);
SendClientMessage(playerid,COLOR_RED,"You are now wanted player ! ");
SetPlayerColor(playerid,COLOR_PURPLE);
}
else
{
}
}
return 1;
}

Djumza
08/06/2012, 11:53 AM
Sorry for double post, but this line:

if(gTeam[playerid] != TEAM_COP || gTeam[playerid] != TEAM_ARMY)

Is this written good ? if ( playerid is not in team cop or team army) ==> do things to the playerid. However if it is , it just dont work as i want ! :v

Djumza
10/06/2012, 10:19 AM
***Refresh***
:v

Shaneisace
11/06/2012, 05:16 AM
Sorry for double post, but this line:

if(gTeam[playerid] != TEAM_COP || gTeam[playerid] != TEAM_ARMY)

Is this written good ? if ( playerid is not in team cop or team army) ==> do things to the playerid. However if it is , it just dont work as i want ! :v

try this:

if(gTeam[playerid] != TEAM_COP && gTeam[playerid] != TEAM_ARMY)

don't use || since that just saying or when you can do && for and

so TEAM_COP || TEAM_ARMY means is TEAM COP or TEAM ARMY

but if you use TEAM_COP && TEAM_ARMY means TEAM COP and TEAM ARMY

Under stand how that works?

Djumza
11/06/2012, 08:28 PM
Yes i understand what it means, but i tried your way and it don't work :/