GivePlayerWeapon not working
#1

I don't usually request scripting help but this has really confused me. GivePlayerWeapon doesn't seam to be working. I have a weapons array with ammo and data (common in a lot of scripts) to save weapons for players. The data is loading into the array fine from the database and everything seems to be working, however GivePlayerWeapon is refusing to function. I have added a printf() to help debug the problem and it looks like everything is working fine.

PHP код:

        
for(new i=0i<13i++) {
            if(
weapons[i][1] > 0) {
            
GivePlayerWeapon(playeridweapons[i][1], weapons[i][2]);
            
printf("Slot %i: Weapon=%i, Ammo=%i"iweapons[i][1], weapons[i][2]);
            }
        } 
When I log into the server and that code runs I am supposed to be supplied with a deagle with 14 rounds. Here is the printf from the above code:

Код:
[17:25:13] Slot 2: Weapon=24, Ammo=14
So as you can see the weapons[] array is working perfectly and the loop is functioning properly since the slot number is 0, but I don't get my deagle when I log in.

Any help would be greatly appreciated... My community's entire development team has looked at this and none can figure it out. We all agree it looks perfect and it should be working.
Reply


Messages In This Thread
[SOLVED] GivePlayerWeapon not working - by quagga - 09.11.2012, 21:15
Respuesta: GivePlayerWeapon not working - by Marricio - 09.11.2012, 21:19
Re: GivePlayerWeapon not working - by quagga - 09.11.2012, 21:25
Respuesta: GivePlayerWeapon not working - by Marricio - 09.11.2012, 21:32
Re: GivePlayerWeapon not working - by Emmet_ - 09.11.2012, 21:32
Re: GivePlayerWeapon not working - by [KHK]Khalid - 09.11.2012, 21:36
Re: GivePlayerWeapon not working - by Abreezy - 09.11.2012, 21:41
Re: GivePlayerWeapon not working - by quagga - 09.11.2012, 21:42

Forum Jump:


Users browsing this thread: 1 Guest(s)