29.02.2016, 17:51
Hi
So I've been having this problem for a while now,my server keeps crashing all i find in the logs is this
I've had this issue with my previous GM version as well,i thought making a new GM from scratch would solve it but obviously i was wrong.
P.S i use SKY plugin by Slice in both versions
Edit :
This is under OnPlayerWeaponShot for both versions i copy/paste this from my old version to my new one i didn't wanna bother making it,i had no time.
So I've been having this problem for a while now,my server keeps crashing all i find in the logs is this
Code:
[18:42:17] [debug] Server crashed while executing LSGWv4.amx [18:42:17] [debug] AMX backtrace: [18:42:17] [debug] #0 00000021 in ?? () at <unknown file>:0 [18:42:17] [debug] #1 00000021 in public OnPlayerWeaponShot () at <unknown file>:0
P.S i use SKY plugin by Slice in both versions
Edit :
Code:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ ) { new Float:lx, Float:ly, Float:lz; GetPlayerPos(playerid, lx, ly, lz); //Desync weapon IDs that don't fire bullets if (weaponid < 22 || weaponid > 38) return 0; //Desync shots with Z pos out of bounds if(!(-20000.0 <= lz <= 20000.0)) return 0; //============================================================================== //==============================(Anti No-Reload)================================ //============================================================================== if(weaponid == PlayerInfo(playerid, OldWeapon)) { // SendClientMessage(playerid,-1,"called"); if(GetPlayerAmmo(playerid) == PlayerInfo(playerid, OldAmmo) && IsAllowedWeapon(weaponid) && weaponid != 29) { switch(PlayerInfo[playerid][FAW]) { case 6:return true; case 5: { new string[128]; format(string,sizeof(string),"%s has been banned for possible no-reload/rapidfire/frozen ammo", GetName(playerid)); //SendClientMessageToAll(COLOR_RED, string); SendGlobalBotMessage(string); BanWithReason(playerid, string, ANTICHEAT_BOT, "No-reload/Frozen Ammo"); PlayerInfo[playerid][FAW] = 6; } default: { PlayerInfo[playerid][FAW] ++; // SendClientMessage(playerid,COLOR_RED, "warning"); } } return true; } } PlayerInfo(playerid, FAW) = 0; PlayerInfo(playerid, OldWeapon) = weaponid; PlayerInfo(playerid, OldAmmo) = GetPlayerAmmo(playerid); return true; } forward IsAllowedWeapon(weapon); public IsAllowedWeapon(weapon) { switch(weapon) { case 22..36 :return true; default: return false; } return true; }