[help] I'm trying to make a pickup function
#1

I'm making a deathmatch server and I'm now working on a pickup function.

I got a array:

new GunModelID[] = {0, 331, 333, 334, 335, 336, 337, 338, 339, 341, 321, 322, 321, 322, 325, 326, 342, 343, 344, 346, 347, 348, 349 ,350 ,351 ,352 , 353, 355, 356, 372, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 371};

and a function:
public OnPlayerDeath(playerid, killerid, reason)

if(GetPlayerWeapon(playerid) != 0)
{
new Float, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
CreatePickup(GunModelID[GetPlayerWeapon(playerid)], 5, x, y, z, 0);
}

It's working but it's not showing/spawning the right weapons, I get a Shotgun if I want to get a pistol. and I checked the array. In my knowledge all the ID's are good. Please help

PS: How can a set the amount of ammo for a pickup gun ?
Reply
#2

Can no one help me ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)