if(pickupid == meatDrops) { if(team[playerid] == TEAM_HUMAN) { if(pInfo[playerid][pHumanClass] == ENGINEER || pInfo[playerid][pHumanClass] == VIPENGINEER || pInfo[playerid][pHumanClass] == BUSINESSHUMAN || pInfo[playerid][pHumanClass] == SCAVENGER) { switch(pInfo[playerid][pHumanClass]) { case SCAVENGER: { new ammo = GetPlayerAmmo(playerid); new Float:armor; GetPlayerArmour(playerid,armor); SetPlayerArmour(playerid, armor+5); SetPlayerAmmo(playerid, GetPlayerWeapon(playerid), ammo+15); GameTextForPlayer(playerid, "~g~Found~w~: Armour and Ammo",4000,5); DestroyPickup(meatDrops); } case ENGINEER: pInfo[playerid][Boxes]++,GameTextForPlayer(playerid,"~g~Found~w~: 1 Box",4000,5),DestroyPickup(meatDrops); case VIPENGINEER: pInfo[playerid][pVipBoxes] += 3,GameTextForPlayer(playerid,"~g~Found~w~: 3 Boxes",4000,5),DestroyPickup(meatDrops); case BUSINESSHUMAN: pInfo[playerid][pXP] += 10*2,GameTextForPlayer(playerid,"~g~Found~w~ xp",4000,5),DestroyPickup(meatDrops); } } else { if(pInfo[playerid][IsPlayerInfected] == 0) { new slot, weap, ammo; for ( slot = 0; slot < 14; slot++ ) { GetPlayerWeaponData(playerid,slot,weap,ammo); if(IsValidWeapon(weap)) { new randomselect = random(2); switch(randomselect) { case 0: { new randomammo = random(50); ServerWeapon(playerid,weap,randomammo); format(string,sizeof(string),"~g~Found~w~: %d ammo",randomammo); GameTextForPlayer(playerid,string,4000,5); DestroyPickup(meatDrops); } case 1: { new randomxp = random(35); format(string,sizeof(string),"~g~Found~w~: %d XP",randomxp); GameTextForPlayer(playerid,string,4000,5); pInfo[playerid][pXP] += randomxp; DestroyPickup(meatDrops); } } } } } } } } else if(pickupid == fakeDrops) { if(team[playerid] == TEAM_HUMAN) { InfectPlayerStandard(playerid); DestroyPickup(fakeDrops); } }
fakeDrops = CreatePickup(2804,19,Float:x,Float:y,Float:z);
meatDrops = CreatePickup(2805,19,Float:x,Float:y,Float:z);
What are you trying to say you want that meatDrops pickup gives only Infections you don't know it can't give by itself you have to make it. lol
You forget to close this statement if(team[playerid] == TEAM_HUMAN) { You have to close it after switch. bacause this team is human so obivously other is Infected. Remove else from your second pickup. |
That "meatDrops" should only gives ammo, boxes, ladders, etc. That "fakeDrops" should only gives Infections.
|
if(pickupid == meatDrops)
{
if(team[playerid] == TEAM_HUMAN)
{
if(pInfo[playerid][pHumanClass] == ENGINEER || pInfo[playerid][pHumanClass] == VIPENGINEER || pInfo[playerid][pHumanClass] == BUSINESSHUMAN || pInfo[playerid][pHumanClass] == SCAVENGER)
{
switch(pInfo[playerid][pHumanClass])
{
case SCAVENGER:
{
new ammo = GetPlayerAmmo(playerid);
new Float:armor;
GetPlayerArmour(playerid,armor);
SetPlayerArmour(playerid, armor+5);
SetPlayerAmmo(playerid, GetPlayerWeapon(playerid), ammo+15);
GameTextForPlayer(playerid, "~g~Found~w~: Armour and Ammo",4000,5);
DestroyPickup(meatDrops);
}
case ENGINEER: pInfo[playerid][Boxes]++,GameTextForPlayer(playerid,"~g~Found~w~: 1 Box",4000,5),DestroyPickup(meatDrops);
case VIPENGINEER: pInfo[playerid][pVipBoxes] += 3,GameTextForPlayer(playerid,"~g~Found~w~: 3 Boxes",4000,5),DestroyPickup(meatDrops);
case BUSINESSHUMAN: pInfo[playerid][pXP] += 10*2,GameTextForPlayer(playerid,"~g~Found~w~ xp",4000,5),DestroyPickup(meatDrops);
}
}
else
{
if(pInfo[playerid][IsPlayerInfected] == 0)
{
new slot, weap, ammo;
for ( slot = 0; slot < 14; slot++ )
{
GetPlayerWeaponData(playerid,slot,weap,ammo);
if(IsValidWeapon(weap))
{
new randomselect = random(2);
switch(randomselect)
{
case 0:
{
new randomammo = random(50);
ServerWeapon(playerid,weap,randomammo);
format(string,sizeof(string),"~g~Found~w~: %d ammo",randomammo);
GameTextForPlayer(playerid,string,4000,5);
DestroyPickup(meatDrops);
}
case 1:
{
new randomxp = random(35);
format(string,sizeof(string),"~g~Found~w~: %d XP",randomxp);
GameTextForPlayer(playerid,string,4000,5);
pInfo[playerid][pXP] += randomxp;
DestroyPickup(meatDrops);
}
}
}
}
}
}
}
}
if(pickupid == fakeDrops)
{
if(team[playerid] == TEAM_HUMAN)
{
InfectPlayerStandard(playerid);
DestroyPickup(fakeDrops);
}
}
stock InfectPlayerStandard(playerid) { if(team[playerid] == TEAM_HUMAN) { if(pInfo[playerid][IsPlayerInfected] == 0) { pInfo[playerid][IsPlayerInfectedTimer] = SetTimerEx("StandardInfection",2000,1,"i",playerid); SetPlayerColor(playerid,COLOR_PINK); TextDrawShowForPlayer(playerid,Infected[playerid]); pInfo[playerid][IsPlayerInfected] = 1; } } return 1; }
Show InfectPlayerStandard(playerid);
also try this PHP код:
|