08.08.2010, 08:23
You can't really detect the model without saving it as a variable of course. But here's a little code that could work out. I haven't really tested this, so i'm not sure if it'll work.
pawn Код:
new weapons[] =
{
-1, // no fists
331, // - Brass Knuckles
333, // Golf Club
334, // Night Stick
335, // Knife
336, // baseball bat
337, // shovel
338, // pool cue
339, // katama
341, // chainsaw
321, // regular dildo
322, // white dildo
323, // Medium, white vibrator
324, // smaill, silver vibrator
325, // flowers
326, // cane
342, // grendade
343, // tear gas
344, // molotov
-1, // RPG rocket - we can't pick up those, do we oO
-1, // Heat-Seeking Rocket
-1, // Hydra rocket
346, // colt 45
347, // colt 45 + silencer
348, // deagle
349, // shotgun
350, // sawn-off
351, // spaz
352, // micro-uzi
353, // mp5
355, // ak47
356, // m4
372, // tec9
357, // country rifle
358, // sniper rifle
359, // rocket launcher
360, // heat-seeking rocket launcher
361, // flamethrower
362, // minigun
363, // sachtel charges
-1, // detonator
365, // spray can
366, // fire extinguisher
367, // camera
-1, // night-vision goggles
-1, // heat-vision goggles
371 // parachute
};
public OnGameModeInit() {
CreatePickup(weapons[30], 1, 0, 0, 0, -1); // Creates a AK-47 pickup.
}
public OnPlayerPickUpPickup(playerid, pickupid) {
SetPVarInt(playerid, "CurrentPickupModel", weapons[MyPickupModel]);
}

