10.06.2013, 21:19
Hey! I'm in process of making a drop system for my server, I currently have this code;
Now that is only half of the code, seeing as there is a lot of weapons I need to add, I was wondering what I could to do to make it smaller and a lot more cleaner, I was thinking of using an array of some sort but, how would I do it?
Thanks!
pawn Код:
case 14: {
WepPickup[CreateDynamicPickup(325, 1, Pos[0]+random(3), Pos[1]+random(3), Pos[2])] = GetPlayerWeapon(playerid);
WepAmmo = Amount;
}
case 15: {
WepPickup[CreateDynamicPickup(326, 1, Pos[0]+random(3), Pos[1]+random(3), Pos[2])] = GetPlayerWeapon(playerid);
WepAmmo = Amount;
}
case 16: {
WepPickup[CreateDynamicPickup(342, 1, Pos[0]+random(3), Pos[1]+random(3), Pos[2])] = GetPlayerWeapon(playerid);
WepAmmo = Amount;
}
case 17: {
WepPickup[CreateDynamicPickup(343, 1, Pos[0]+random(3), Pos[1]+random(3), Pos[2])] = GetPlayerWeapon(playerid);
WepAmmo = Amount;
}
Thanks!