- 0
Anti-reclama
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
Xcite
Salut , am in gamemode Findip care gaseste ip si la comenzi e adaugat if(FindIP(cmdtext)) return Kick4ip(playerid);
Codul findip:
FindIP(StrToChk[]) { if(strfind("hai pe serveru asta", ".com", true) != -1) //returns 4 (!= -1 because -1 would be 'not found') { } else if(strfind("se dau admine", ".ro", true) != -1) //returns 4 (!= -1 because -1 would be 'not found') { } else if(strfind("intra pe", ".net", true) != -1) //returns 4 (!= -1 because -1 would be 'not found') { } else if(strfind("hai aici", ".info", true) != -1) //returns 4 (!= -1 because -1 would be 'not found') { } else if(strfind("7777", ".in", true) != -1) //returns 4 (!= -1 because -1 would be 'not found') { } new IpLevel = 0; for(new a = 0; a < strlen(StrToChk); a++) { switch(IpLevel) { case 0: { if(IsNum(StrToChk[a])) IpLevel++; } case 1, 2: { if(IsNum(StrToChk[a])) IpLevel++; else if(StrToChk[a] == '.') IpLevel = 4; else IpLevel = 0; } case 3: { if(StrToChk[a] == '.') IpLevel++; else IpLevel = 0; } case 4: { if(IsNum(StrToChk[a])) IpLevel++; else IpLevel = 0; } case 5, 6: { if(IsNum(StrToChk[a])) IpLevel++; else if(StrToChk[a] == '.') IpLevel = 8; else IpLevel = 0; } case 7: { if(StrToChk[a] == '.') IpLevel++; else IpLevel = 0; } case 8: { if(IsNum(StrToChk[a])) IpLevel++; else IpLevel = 0; } case 9, 10:{ if(IsNum(StrToChk[a])) IpLevel++; else if(StrToChk[a] == '.') IpLevel = 12; else IpLevel = 0; } case 11: { if(StrToChk[a] == '.') IpLevel++; else IpLevel = 0; } case 12: { if(IsNum(StrToChk[a])) return 1; else IpLevel = 0; } } } return 0; }Am incercat :if(strfind("hai pe serveru asta", ".com", true) != -1) //returns 4 (!= -1 because -1 would be 'not found') { return Kick4IP(playerid); }dar primesc eroare ca nu e definit playerid.
ar trebui sa fac FindIP(playerid, StrToChk[]) ?
4 answers to this question
Recommended Posts