29.06.2018, 12:43
Hi, I need help with this..
That "meatDrops" should only gives ammo, boxes, ladders, etc. That "fakeDrops" should only gives Infections.
But when I go ingame, once I pick fakeDrops, it gives me ammo, boxes, ladders, etc too. Even when I pick meatDrops, it also gives me ammo, boxes, ladders, etc too.
Help me with this. Thanks.
Additionally: These fakeDrops and meatDrops appears when a player dies. Here's their info.
Код:
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); } }
But when I go ingame, once I pick fakeDrops, it gives me ammo, boxes, ladders, etc too. Even when I pick meatDrops, it also gives me ammo, boxes, ladders, etc too.
Help me with this. Thanks.
Additionally: These fakeDrops and meatDrops appears when a player dies. Here's their info.
Код:
fakeDrops = CreatePickup(2804,19,Float:x,Float:y,Float:z);
Код:
meatDrops = CreatePickup(2805,19,Float:x,Float:y,Float:z);