OnPlayerUpdate not working?
#1

I have a strange problem.
I wanted to make an anti weapon hack by this(http://forum.sa-mp.com/showthread.ph...ti+weapon+hack) tutorial and it didn't work.
After I tested if OnPlayerUpdate is working and it didnt work

I used this in my script

pawn Код:
public OnPlayerUpdate(playerid)
{
    SendClientMessage(playerid,-1,"Test 123...");
    return 1;
}
and after that I used it in Grand Larceny that i found in gamemodes,of course the chat was spamming 123 but in my gamemode it didn't.

Why?
Reply
#2

I'm not 100% sure, but you have have to return 1 in OnPlayerUpdate in every loaded filterscript. I had a similar problem and I think that's how I fixed it - IIRC filterscript callbacks get called first. I'm not 100% certain though.
Reply
#3

I'm not using any FS.Maybe because I deleted all the public funcions when i started the gamemode and added only the one I need?

This is realy srange,the same code in 2 gamemodes,in one its working in one not...
Reply
#4

Are you sure you compiled it and loaded the correct gamemode on your server?
Reply
#5

I finaly got it,after removing plugins and includes i found out that after removing the include <fixes> it works,so putting the include back on it didn't work,put it off it worked.

Conclusion:using includes to help you script makes you more problems that you should have normaly
Reply
#6

Don't use OnPlayerUpdate for anti-cheat, use timers instead. OnPlayerUpdate gets called too often, it may cause lag for you. I may be wrong tho...
Reply
#7

Guys.... You saved my HOLE LIFE!!! I've been strugling for months to fix this problem and now i realise that was that god damn FIXES! THKS
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)