SA-MP Forums Archive
Advertisement - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Advertisement (/showthread.php?tid=310528)



Advertisement - Alexander_123 - 12.01.2012

Hello!
I need a anti advertisement.In that if player type their ip address they should get kick or ban and not only in main chat, in it on /pm messages too ( very important) Please help me fast its urgent


Re: Advertisement - Scenario - 12.01.2012

http://forum.sa-mp.com/showpost.php?...&postcount=977

Search next time please.


Re: Advertisement - Alexander_123 - 12.01.2012

Ok but how it will work in /PM ?


Re: Advertisement - Twinki1993 - 12.01.2012

This doesnt go for a specific text, it goes for all mate. So it doesnt matter if you type in /pm or global, player will still get banned for advertising.


Re: Advertisement - Alexander_123 - 12.01.2012

no its not working in /pm


Re: Advertisement - Ash. - 12.01.2012

Please tell me you're actually using it in your PM command.

Show us your PM command.


Re: Advertisement - Alexander_123 - 12.01.2012

when anyone advertise a server ip through this cmd then they should get banned.
pawn Код:
CMD:me(playerid,params[]) {
    new Message[128], sendername[MAX_PLAYER_NAME];
    new actiontext[MAX_CHATBUBBLE_LENGTH+1];
    new metext[MAX_CHATBUBBLE_LENGTH+1];
    new pname[24],string[128];
    GetPlayerName(playerid,pname,sizeof(pname));
    if (sscanf(params, "s", Message)) return SendMessageToPlayer(playerid, COLOR_LIGHTBLUE, "USAGE: /me <text>");
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(actiontext,MAX_CHATBUBBLE_LENGTH,"* %s",Message);
    format(metext,MAX_CHATBUBBLE_LENGTH,"*%s %s",sendername,Message);
    SetPlayerChatBubble(playerid,actiontext,ACTION_COLOR,30.0,10000);
    SendMessageToAll(NICE_PINK,metext);
    return 1;}



Re: Advertisement - Ash. - 12.01.2012

Quote:
Originally Posted by Alexander_123
Посмотреть сообщение
when anyone advertise a server ip through this cmd then they should get banned.
pawn Код:
CMD:me(playerid,params[]) {
    new Message[128], sendername[MAX_PLAYER_NAME];
    new actiontext[MAX_CHATBUBBLE_LENGTH+1];
    new metext[MAX_CHATBUBBLE_LENGTH+1];
    new pname[24],string[128];
    GetPlayerName(playerid,pname,sizeof(pname));
    if (sscanf(params, "s", Message)) return SendMessageToPlayer(playerid, COLOR_LIGHTBLUE, "USAGE: /me <text>");
    GetPlayerName(playerid, sendername, sizeof(sendername));
    format(actiontext,MAX_CHATBUBBLE_LENGTH,"* %s",Message);
    format(metext,MAX_CHATBUBBLE_LENGTH,"*%s %s",sendername,Message);
    SetPlayerChatBubble(playerid,actiontext,ACTION_COLOR,30.0,10000);
    SendMessageToAll(NICE_PINK,metext);
    return 1;}
Like I said, you actually need to USE the StringContainsIP function (or whatever it's called) within that script.


Re: Advertisement - Alexander_123 - 12.01.2012

I used it but it is not working dude....
When i use that script , then i typed an ip on main chat and that time i got banned and when i type ip in /me cmd then i am not getting banned.Can you please fix it for me? +rep


Re: Advertisement - Alexander_123 - 12.01.2012

Help please.....