if(strcmp(cmd, \"/hirdetés\", true) == 0 || strcmp(cmd, \"/hirdetés\", true) == 0){ if(IsPlayerConnected(playerid)) { GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= \' \')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_GRAD2, \"HASZNÁLAT: /hirdetés [szöveg]\"); return 1; } new hosszusag = strlen(result); if(strfind(result,\".\", true,0) != -1) { if(strfind(result,\":\",true,0) !=-1) { SendClientMessage(playerid, COLOR_GRAD2, \"Ezt a hirdetést nem adhatod fel!\"); return 1; } } if(strfind(result,\"91\", true,0) != -1) { if(strfind(result,\":77\",true,0) !=-1) { SendClientMessage(playerid, COLOR_GRAD2, \"Ezt a hirdetést nem adhatod fel!\"); return 1; } } if(PlayerInfo[playerid][Penz] >= hosszusag*2) { format(stringx,256,\"[HIRDETÉS]: %s, Feladó: %s, (Tel.Szám.: %d)\",result,sendername,PlayerInfo[playerid][pPnumber]); OOCNews(0x7FFF00,stringx); PlayerInfo[playerid][Penz] -= hosszusag*2; varoskassza += hosszusag*2; Savevaroskassza(); format(stringx,sizeof(stringx), \"A hírdetésben %d karaktert használtál fel ami %d$!\",hosszusag,hosszusag*2); SendClientMessage(playerid, COLOR_WHITE, stringx); SafeGivePlayerMoney(playerid, -hosszusag*2); new nev[32]; GetPlayerName(playerid, nev, sizeof(nev)); new h,mi,s,y,m,d; getdate(y,m,d); gettime(h,mi,s); format(stringx,sizeof(stringx), \"[%d/%d/%d][%d:%d:%d] [HIRDETÉS]: %s, Feladó: %s, (Tel.Szám.: %d)\",y,m,d,h,mi,s,result,nev,PlayerInfo[playerid][pPnumber]); LoOoG(stringx); } else SendClientMessage(playerid, COLOR_GRAD1, \"A hírdetés ára 2$*karakter!\");}return 1;}
(strcmp(cmd, \"/hirdetés\", true) == 0 || strcmp(cmd, \"/hirdetés\", true)
#include <a_samp> new str[128]; public OnPlayerText(playerid, text[]){ if(anty(text) && !IsPlayerAdmin(playerid)){format(str,256,\"%s Kickelve lett a szerverrõl(IP).Ok: Hirdetés \",PlayerName(playerid));SendClientMessageToAll(0xFF0000FF, str);Kick(playerid);return 0;} return 1;}stock anty(string[]){if(strfind(string,\"www.\",true)!=-1 || strfind(string,\"http://\",true)!=-1 || strfind(string,\".com\",true)!=-1 || strfind(string,\".net\",true)!=-1 || strfind(string,\"91.\",true)!=-1 || strfind(string,\"195.\",true)!=-1 || strfind(string,\".pl\",true)!=-1||strfind(string, \".hu\", true)!=-1 || strfind(string,\".org\",true)!=-1)return true;return false;} stock PlayerName(playerid){new name[MAX_PLAYER_NAME];GetPlayerName(playerid, name, MAX_PLAYER_NAME);return name;}