Mivčo 90 Odesláno: 8. Leden, 2015 Share Odesláno: 8. Leden, 2015 public OnPlayerText(playerid, text[]){ new placeholder; if(PlayerInfo[playerid][Muted] == 1){ SendClientMessage(playerid, Red, "[Server] Nemôžeš písat..."); return 0; } if(text[0] == '!' && PlayerInfo[playerid][Admin] >= 1){ new string[256]; format(string,sizeof(string),"Admin Chat: %s: %s",pName(playerid),text[1]); MessageToAdmins(COLOR_GREEN,string); return 0; } if(ServerInfo[AntiSpam] == 1){ if(PlayerInfo[playerid][Admin] == 0){ if(PlayerInfo[playerid][SpamCount] == 0) PlayerInfo[playerid][SpamTime] = TimeStamp(); PlayerInfo[playerid][SpamCount]++; if(TimeStamp() - PlayerInfo[playerid][SpamTime] > SPAM_TIMELIMIT){ PlayerInfo[playerid][SpamCount] = 0; PlayerInfo[playerid][SpamTime] = TimeStamp(); } else if(PlayerInfo[playerid][SpamCount] == MAX_SPAM_MSGS) { KickPlayer(playerid,"Spam Protection"); } else if(PlayerInfo[playerid][SpamCount] == MAX_SPAM_MSGS-1) { SendClientMessage(playerid,Red,"Anti Spam Warning!"); return 0; } } for(new i = 0; i < sizeof BadWords; i++){ placeholder = strfind(text, BadWords[i], true); if(placeholder != -1){ for(new x = placeholder; x < placeholder + strlen(BadWords[i]); x ++){ text[x] = '*'; }}} new pText[144]; format(pText, sizeof (pText), "(%d) %s", playerid, text); SendPlayerMessageToAll(playerid, pText); return 0; } Nechce mi to dat do AMX ale ked dam OnPlayerText preč tak mi to dá 1 error možná bude chyba zo zatvorkama.....? Link to comment Share on other sites More sharing options...
0 Mattsy 29 Odesláno: 8. Leden, 2015 Share Odesláno: 8. Leden, 2015 public OnPlayerText(playerid, text[]) { new placeholder; if(PlayerInfo[playerid][Muted] == 1) { SendClientMessage(playerid, Red, "[Server] Nemôžeš písat..."); return 0; } if(text[0] == '!' && PlayerInfo[playerid][Admin] >= 1) { new string[256]; format(string,sizeof(string),"Admin Chat: %s: %s",pName(playerid),text[1]); MessageToAdmins(COLOR_GREEN,string); return 0; } if(ServerInfo[AntiSpam] == 1) { if(PlayerInfo[playerid][Admin] == 0) { if(PlayerInfo[playerid][SpamCount] == 0) PlayerInfo[playerid][SpamTime] = TimeStamp(); PlayerInfo[playerid][SpamCount]++; if(TimeStamp() - PlayerInfo[playerid][SpamTime] > SPAM_TIMELIMIT) { PlayerInfo[playerid][SpamCount] = 0; PlayerInfo[playerid][SpamTime] = TimeStamp(); } else if(PlayerInfo[playerid][SpamCount] == MAX_SPAM_MSGS) { KickPlayer(playerid,"Spam Protection"); } else if(PlayerInfo[playerid][SpamCount] == MAX_SPAM_MSGS-1) { SendClientMessage(playerid,Red,"Anti Spam Warning!"); return 0; } } } for(new i = 0; i < sizeof BadWords; i++) { placeholder = strfind(text, BadWords[i], true); if(placeholder != -1) { for(new x = placeholder; x < placeholder + strlen(BadWords[i]); x ++) { text[x] = '*'; } } } new pText[144]; format(pText, sizeof (pText), "(%d) %s", playerid, text); SendPlayerMessageToAll(playerid, pText); return 0; } Keby si dával normálne zátvorky tak by si na to prišiel že ti jedna chýba 1 Link to comment Share on other sites More sharing options...
0 Mivčo 90 Odesláno: 8. Leden, 2015 Author Share Odesláno: 8. Leden, 2015 Dakujem Link to comment Share on other sites More sharing options...
Dotaz
Mivčo 90
Nechce mi to dat do AMX ale ked dam OnPlayerText preč tak mi to dá 1 error
možná bude chyba zo zatvorkama.....?
Link to comment
Share on other sites
2 odpovědí na tuto otázku
Recommended Posts