M
MihailM
Здравствуйте , помогите исправить плагин .. а то что-то не нравиться ему :
Вот кусок кода/функции :
Заранее благодарен !
Вот кусок кода/функции :
PHP:
public Action:Timer_Ammo(Handle:timer, any:client)
{
if (g_bEnabled)
{
decl String:sClassName[64];
new iWeaponIndex = 0;
for (new i = 0, iWeapon, iAmount, iAmmo; i < 5; i++) {
if ((iWeapon = GetPlayerWeaponSlot(client, i)) != -1) { // 66 строчка
iAmount = GetEntData(iWeapon, g_iClipOffset);
GetEntityNetClass(iWeapon,sClassName,sizeof(sClassName));
ReplaceString(sClassName,sizeof(sClassName),"CWeapon","");
iWeaponIndex = GetWeaponIndex(sClassName);
if (iWeaponIndex > -1 && g_iAmount[iWeaponIndex] > -1) {
iAmount = g_iAmount[iWeaponIndex];
iAmmo = g_iAmmo[iWeaponIndex];
SetEntData(client, iAmmo, iAmount, _, true);
}
}
}
}
return Plugin_Continue;
}
PHP:
L 09/16/2014 - 00:43:13: [SM] Native "GetPlayerWeaponSlot" reported: Client 13 is not in game
L 09/16/2014 - 00:43:13: [SM] Displaying call stack trace for plugin "dod_ammo.smx":
L 09/16/2014 - 00:43:13: [SM] [0] Line 66, /home/forums/content/files/4/1/6/8/1/56564.attach::Timer_Ammo()
L 09/16/2014 - 01:16:31: Error log file session closed.