Pm advertisment - 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: Pm advertisment (
/showthread.php?tid=355576)
Pm advertisment -
God'Z War - 30.06.2012
Hi Guys,
i was searching pm advertisment kick for 2 day i didnt get.its there to attak pm advertiser to kick for pm advertisment
Re: Pm advertisment -
«XTC» - 30.06.2012
there is an example in lux admin script... anti advertisement script
Re: Pm advertisment -
God'Z War - 30.06.2012
i am using lux admin but i didnt find it we can advertise in pm
Re: Pm advertisment -
Mean - 30.06.2012
You can use this stock (I did not make it).
pawn Код:
stock detectIP(text[])
{
new
dotCount
;
for(new i; text[i] != 0; ++i)
{
if('0' <= text[i] <= '9')
{
do
{
if(text[i] == '.') ++dotCount;
++i;
}
while(('0' <= text[i] <= '9') || text[i] == '.' || text[i] == ':');
}
else dotCount = -1;
}
return (dotCount > 2);
}
Then you can use:
pawn Код:
if(detectIP(sometext)) {
// If there's an IP in the text
}
else {
// No IP in the text
}
Re: Pm advertisment -
Lordzy - 30.06.2012
Even im facing the same problem,i tried many anti advertisements but there is no anti advertisment for commandtext(in my search) except Junkbuster.
But JunkBuster can't be compiled in my gm so i also need a good anti advertise.
Please help me also.
Edit:Fixed!
Re: Pm advertisment -
Mean - 30.06.2012
Quote:
Originally Posted by [xB]Lordz
Even im facing the same problem,i tried many anti advertisements but there is no anti advertisment for commandtext(in my search) except Junkbuster.
But JunkBuster can't be compiled in my gm so i also need a good anti advertise.
Please help me also.
|
You can use the stock I posted anywhere you want.
Re: Pm advertisment -
Lordzy - 30.06.2012
Thanks but will that function help to protect against pm advertisement.
Example:
/pm 15.25.35....
Re: Pm advertisment -
zombieking - 30.06.2012
So you use the function in your PM command right?
Re: Pm advertisment -
Crazyboobs - 30.06.2012
But undefined symbol sometext, how to fix this?
Re: Pm advertisment -
God'Z War - 30.06.2012
Quote:
Originally Posted by Mean
You can use this stock (I did not make it).
pawn Код:
stock detectIP(text[]) { new dotCount ; for(new i; text[i] != 0; ++i) { if('0' <= text[i] <= '9') { do { if(text[i] == '.') ++dotCount; ++i; } while(('0' <= text[i] <= '9') || text[i] == '.' || text[i] == ':'); } else dotCount = -1; } return (dotCount > 2); }
Then you can use:
pawn Код:
if(detectIP(sometext)) { // If there's an IP in the text } else { // No IP in the text }
|
You said-----------------------------------------------------
Then you can use:
pawn Код:
if(detectIP(sometext)) {
// If there's an IP in the text
}
else {
// No IP in the text
}
Where i should put this codes