14.11.2009, 03:53
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid, gTeam)
{
if (pickupid == bomba)
{
if(BombArmed[gTeam] == false && DM21[playerid] == true) //with gteam in there I want all effects to apply to EVERYONE in the server and not just a player ID. This code is not working..
{
GetPlayerPos(playerid, BombX[playerid], BombY[playerid], BombZ[playerid]);
GetXYInFrontOfPlayer(playerid, BombX[playerid], BombY[playerid], 0.7);
SendClientMessage(playerid, 0x0066FFAA, "Bomb Planted (exploding in 10 seconds).");
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
BombObject1[playerid] = CreateObject(1252, BombX[playerid], BombY[playerid], BombZ[playerid] - 0.8,270,0,0);
BombTime = SetTimerEx("BombTimer",30000,0, "d", playerid);
BombArmed[gTeam] = true;
}
else if(BombArmed[gTeam] == true && DM21[playerid] == true)
{
SendClientMessage(playerid, 0x0066FFAA, "The bomb is armed (30 Seconds) Do not let it become diffused!");
}
else if(BombArmed[gTeam] == true && DM20[playerid] == true)
{
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
Difusing = SetTimerEx("Difusingbomba",5000,0, "d", playerid);
BombArmed[playerid] = false;
}
else if(BombArmed[gTeam] == false && DM20[playerid] == true)
{
SendClientMessage(playerid, 0x0066FFAA, "This is bombsite A. You must not let the terrorists arm it");
}
return 1;
}
if (pickupid == bombb)
{
if(BombArmed2[gTeam] == false && DM21[playerid] == true)
{
GetPlayerPos(playerid, BombX[playerid], BombY[playerid], BombZ[playerid]);
GetXYInFrontOfPlayer(playerid, BombX[playerid], BombY[playerid], 0.7);
SendClientMessage(playerid, 0x0066FFAA, "Bomb Planted (exploding in 10 seconds).");
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
BombObject2[playerid] = CreateObject(1252, BombX[playerid], BombY[playerid], BombZ[playerid] - 0.8,270,0,0);
BombTime2 = SetTimerEx("BombTimer2",30000,0, "d", playerid);
BombArmed2[gTeam] = true;
}
else if(BombArmed2[gTeam] == true && DM21[playerid] == true)
{
SendClientMessage(playerid, 0x0066FFAA, "The bomb is armed (30 Seconds) Do not let it become diffused!");
}
else if(BombArmed2[gTeam] == true && DM20[playerid] == true)
{
ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
BombSiteB = SetTimerEx("BombSiteBdiffuse",30000,0, "d", playerid);
SendClientMessage(playerid, 0x0066FFAA, "Bomb B Diffused");
BombArmed2[playerid] = false;
}
else if(BombArmed2[gTeam] == false && DM20[playerid] == true)
{
SendClientMessage(playerid, 0x0066FFAA, "This is bombsite B. You must not let the terrorists arm it");
}
return 1;
}