Tedy 8 Odesláno: 24. Srpen, 2014 Share Odesláno: 24. Srpen, 2014 Ahojte, chtěl bych se zeptat zda by mi někdo pomohl s jednoduchým Anti spamem,aby mi na serveru hackeři nespamovali nějaké ehmky... Děkuji Link to comment Share on other sites More sharing options...
0 danda951 0 Odesláno: 24. Srpen, 2014 Share Odesláno: 24. Srpen, 2014 Tady new spam[MAX_PLAYERS]; //K Newum forward Anti_spam(playerid); //K Forwardum public OnPlayerText(playerid, text[]) { if(spam[playerid] == 1) { SendClientMessage(playerid,cervena,"[Anti-Spam] Jen jedna správa za 5 sekund."); return 0; } else { spam[playerid] = 1; SetTimerEx("Anti_spam",5000,0,"i",playerid); } return 1; } public Anti_spam(playerid) { spam[playerid] = 0; return 1; } Je to dělané podle návodu Čas si nastav sám v Timeru Link to comment Share on other sites More sharing options...
0 Tedy 8 Odesláno: 24. Srpen, 2014 Author Share Odesláno: 24. Srpen, 2014 Errory - C:\Users\Pc\Desktop\AntiSpam.pwn(1) : error 017: undefined symbol "MAX_PLAYERS" C:\Users\Pc\Desktop\AntiSpam.pwn(1) : error 009: invalid array size (negative, zero or out of bounds) C:\Users\Pc\Desktop\AntiSpam.pwn(5) : warning 235: public function lacks forward declaration (symbol "OnPlayerText") C:\Users\Pc\Desktop\AntiSpam.pwn(9) : error 017: undefined symbol "SendClientMessage" C:\Users\Pc\Desktop\AntiSpam.pwn(15) : error 017: undefined symbol "SetTimerEx" Link to comment Share on other sites More sharing options...
0 Lax. 28 Odesláno: 24. Srpen, 2014 Share Odesláno: 24. Srpen, 2014 jednoduché a krátke: public OnPlayerText(playerid, text[]) { if(gettime()-GetPVarInt(playerid,"AntiSpam") < 3) { SendClientMessage(playerid, -1, "Nespamuj. Jedna správa raz za 3 sekundy."); return false; } else { SetPVarInt(playerid,"AntiSpam",gettime()); } return false; } Link to comment Share on other sites More sharing options...
0 Tedy 8 Odesláno: 24. Srpen, 2014 Author Share Odesláno: 24. Srpen, 2014 Děkuji,ale hází to zase errory : C:\Users\Pc\Desktop\AntiSpam.pwn(1) : warning 235: public function lacks forward declaration (symbol "OnPlayerText") C:\Users\Pc\Desktop\AntiSpam.pwn(4) : error 017: undefined symbol "gettime" C:\Users\Pc\Desktop\AntiSpam.pwn(6) : error 017: undefined symbol "SendClientMessage" C:\Users\Pc\Desktop\AntiSpam.pwn(9) : error 017: undefined symbol "SetPVarInt" Link to comment Share on other sites More sharing options...
0 Lax. 28 Odesláno: 24. Srpen, 2014 Share Odesláno: 24. Srpen, 2014 #include <a_samp> Link to comment Share on other sites More sharing options...
0 Tedy 8 Odesláno: 24. Srpen, 2014 Author Share Odesláno: 24. Srpen, 2014 Děkuji Link to comment Share on other sites More sharing options...
Dotaz
Tedy 8
Ahojte,
chtěl bych se zeptat zda by mi někdo pomohl s jednoduchým Anti spamem,aby mi na serveru hackeři nespamovali nějaké ehmky... Děkuji
Link to comment
Share on other sites
6 odpovědí na tuto otázku
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now