no armor for other team -
aqu - 22.02.2011
Hello,I want to make that teams has got their own armors.If other team want to take their armor,they will not get it.
I made like this(example:for ballas team):
Код:
// On the top
new ballasarmor;
// On gamemodinit
ballasarmor = CreatePickup(1242, 3, 1926.0625, -1115.0798339844, 27.088310241699, -1);
// onplayerPicUpPicup
if(pickupid == ballasarmor)
if(gTeam[playerid] == TEAM_BALLAS )
{
GivePlayerArmour(playerid,100);
}
else{
SendClientMessage(playerid, COLOR_SAND, ":SERVER: This Armor belongs to Ballas Team !");
}
But when other team stands on armor he gets it,I want to make that he not get armor.
any help ?
Re: no armor for other team -
FreshKilla - 22.02.2011
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
switch(pickupid)
{
case ballasarmor:
{
if(gTeam[playerid] == TEAM_BALLAS) GivePlayerArmour(playerid,100);
else SendClientMessage(playerid, COLOR_SAND, ":SERVER: This Armor belongs to Ballas Team !");
}
}
return 1;
}
Also you might want to check if your gTeam's are assigned correctly.
Re: no armor for other team -
maramizo - 22.02.2011
pawn Код:
// On the top
new ballasarmor;
// On gamemodinit
ballasarmor = CreatePickup(1242, 3, 1926.0625, -1115.0798339844, 27.088310241699, -1);
// onplayerPickUpPickup
if(pickupid == ballasarmor)
if(gTeam[playerid] == TEAM_BALLAS)
{
GivePlayerArmour(playerid,100);
}
else if(gTeam[playerid] != TEAM_BALLAS)
{
SendClientMessage(playerid, COLOR_SAND, ":SERVER: This Armor belongs to Ballas Team !");
}
Try this.
Re: no armor for other team -
aqu - 22.02.2011
....
Re: no armor for other team -
maramizo - 22.02.2011
What case? That wasn't posted in the script you provided.
Re: no armor for other team -
aqu - 22.02.2011
FreshKilla,I am getting error : error 008: must be a constant expression; assumed zero
And maramizo,I tried like this: I get other team with 0 armor,I get on ballas armor and I get messege and I got 100 armor.
I am getting messege that that armor not belongs to my team,but I am getting armor full armor.
Re: no armor for other team -
maramizo - 22.02.2011
Aqu show me everything that's related to ballasarmor please?
Re: no armor for other team -
aqu - 22.02.2011
Here is all my armor script:
Код:
// On the top
new ballasarmor;
new vagosarmor;
new aztecasarmor;
new copsarmor;
new bikersarmor;
new fastfoodarmor;
new armyarmor;
new drugarmor;
// On game mod init:
ballasarmor = CreatePickup(1242, 3, 1926.0625, -1115.0798339844, 27.088310241699, -1);
vagosarmor = CreatePickup(1242, 3, 2764.8544921875, -1181.5250244141, 69.401588439941, -1);
aztecasarmor = CreatePickup(1242, 3, 1797.6320800781, -2144.19921875, 13.546875, -1);
copsarmor = CreatePickup(1242, 3, 1553.3674316406, -1671.54296875, 13.556713104248, -1);
bikersarmor = CreatePickup(1242, 3, 472.64779663086, -1771.92578125, 14.120258331299, -1);
fastfoodarmor = CreatePickup(1242, 3, 958.53991699219, -1382.1772460938, 13.65625, -1);
armyarmor = CreatePickup(1242, 3, 2717.0827636719, -2380.2763671875, 17.340341567993, -1);
drugarmor = CreatePickup(1242, 3, 1127.294921875, -2045.7790527344, 69.0078125, -1);
// On payerpicuppicup
if(pickupid == ballasarmor)
if(gTeam[playerid] == TEAM_BALLAS )
{
GivePlayerArmour(playerid,100);
}
else{
SendClientMessage(playerid, COLOR_SAND, ":SERVER: This Armor belongs to Ballas Team !");
}
if(pickupid == vagosarmor)
if(gTeam[playerid] == TEAM_VAGOS )
{
GivePlayerArmour(playerid,100);
}
else{
SendClientMessage(playerid, COLOR_SAND, ":SERVER: This Armor belongs to Vagos Team !");
}
if(pickupid == aztecasarmor)
if(gTeam[playerid] == TEAM_AZTECAS )
{
GivePlayerArmour(playerid,100);
}
else{
SendClientMessage(playerid, COLOR_SAND, ":SERVER: This Armor belongs to Aztecas Team !");
}
if(pickupid == copsarmor)
if(gTeam[playerid] == TEAM_COPS )
{
GivePlayerArmour(playerid,100);
}
else{
SendClientMessage(playerid, COLOR_SAND, ":SERVER: This Armor belongs to Cops Team !");
}
if(pickupid == bikersarmor)
if(gTeam[playerid] == TEAM_BIKERS )
{
GivePlayerArmour(playerid,100);
}
else{
SendClientMessage(playerid, COLOR_SAND, ":SERVER: This Armor belongs to Bikers Team !");
}
if(pickupid == fastfoodarmor)
if(gTeam[playerid] == TEAM_FASTFOOD )
{
GivePlayerArmour(playerid,100);
}
else{
SendClientMessage(playerid, COLOR_SAND, ":SERVER: This Armor belongs to FastFood Team !");
}
if(pickupid == armyarmor)
if(gTeam[playerid] == TEAM_ARMY )
{
GivePlayerArmour(playerid,100);
}
else{
SendClientMessage(playerid, COLOR_SAND, ":SERVER: This Armor belongs to Army Team !");
}
if(pickupid == drugarmor)
if(gTeam[playerid] == TEAM_DEAL )
{
GivePlayerArmour(playerid,100);
}
else{
SendClientMessage(playerid, COLOR_SAND, ":SERVER: This Armor belongs to Drug Dealers Team !");
}
Re: no armor for other team -
maramizo - 22.02.2011
And this error only occurs with TEAM_BALLAS?
Re: no armor for other team -
aqu - 22.02.2011
With all teams,