ProxDetector How to get it work ? -
RoleplayEditor - 19.08.2011
Hey guys ,
I'm making a RP server and so
How can get it work ? the proxdetector..
Well , i saw some older post and copied and it compiled fine. When i go IG and checked it , it didn't worked..
Can anyone of you provide me a working proxdetector ? + if its a stock , where do i put it ? Please..
Regards ,
-RoleplayEditor
Re: ProxDetector How to get it work ? -
doreto - 19.08.2011
https://sampforum.blast.hk/showthread.php?tid=31653 check this
Re: ProxDetector How to get it work ? -
RoleplayEditor - 19.08.2011
That's a Property System dude..
Learn to read really...
Guys please i really need a working one.
Re: ProxDetector How to get it work ? -
Toreno - 19.08.2011
Hope this will be good;
pawn Код:
stock ProxDetector(Float:radi, playerid, str[],col1,col2,col3,col4,col5) {
new Float:P[3], Float:OP[3], Float:TP[3];
GetPlayerPos(playerid, OP[0], OP[1], OP[2]);
for(new i; i < MAX_PLAYERS; i++) {
GetPlayerPos(i, P[0], P[1], P[2]);
TP[0] = (OP[0]-P[0]);
TP[1] = (OP[1]-P[1]);
TP[2] = (OP[2]-P[2]);
if(((TP[0] < radi/16) && (TP[0] > -radi/16)) && ((TP[1] < radi/16) && (TP[1] > -radi/16)) && ((TP[2] < radi/16) && (TP[2] > -radi/16))) SendClientMessage(i, col1, str);
else if (((TP[0] < radi/8) && (TP[0] > -radi/8)) && ((TP[1] < radi/8) && (TP[1] > -radi/8)) && ((TP[2] < radi/8) && (TP[2] > -radi/8))) SendClientMessage(i, col2, str);
else if (((TP[0] < radi/4) && (TP[0] > -radi/4)) && ((TP[1] < radi/4) && (TP[1] > -radi/4)) && ((TP[2] < radi/4) && (TP[2] > -radi/4))) SendClientMessage(i, col3, str);
else if (((TP[0] < radi/2) && (TP[0] > -radi/2)) && ((TP[1] < radi/2) && (TP[1] > -radi/2)) && ((TP[2] < radi/2) && (TP[2] > -radi/2))) SendClientMessage(i, col4, str);
else if (((TP[0] < radi) && (TP[0] > -radi)) && ((TP[1] < radi) && (TP[1] > -radi)) && ((TP[2] < radi) && (TP[2] > -radi))) SendClientMessage(i, col5, str);
}
return 1;
}
Re: ProxDetector How to get it work ? -
RoleplayEditor - 19.08.2011
Where do i put that stock ? in the end of the script ?
Re: ProxDetector How to get it work ? -
Kush - 19.08.2011
Quote:
Originally Posted by doreto
|
...??
PHP код:
stock SendChatMessage(playerid,color,msg[],Float:radius)
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
foreach(Player, i)
{
if(IsPlayerInRangeOfPoint(i,radius,x,y,z))SendClientMessage(i,color,msg);
}
return 1;
}
A minor example of how Proxdetector works. If you really want it, string it from the Godfather. This sends formatted text at a radius, the only difference is, it doesn't support multiple colors like Proxdetector.
Re: ProxDetector How to get it work ? -
RoleplayEditor - 19.08.2011
Dude , How do you make that work ? Where do i put that ? in the end of the script or where ?
As in my script , it doesn't even is colored like that.
Re: ProxDetector How to get it work ? -
Toreno - 19.08.2011
The one I gave support multiple colours, just put it somewhere in your game mode, that should be fine.
Re: ProxDetector How to get it work ? -
RoleplayEditor - 19.08.2011
Well , Mind if you can help me ? I tried both of them and both of them isn't working..
my friend can still hear what i say ..
Toreno , If you have MSN :
Add me
evilbenzke@hotmail.com
or if any other , then please PM me ( if you like privacy ) , I really want it to get fixed.
Re: ProxDetector How to get it work ? -
Toreno - 19.08.2011
I have changed that to make it easier, here is the original one, have a try;
pawn Код:
stock ProxDetector(Float:radi, playerid, len[],col1,col2,col3,col4,col5)
{
if(IsPlayerConnected(playerid)) {
new Float:posx, Float:posy, Float:posz;
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
for(new i = 0; i < MAX_PLAYERS; i++) {
if(IsPlayerConnected(i) && (GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i))) {
if(!BigEar[i]) {
GetPlayerPos(i, posx, posy, posz);
tempposx = (oldposx -posx);
tempposy = (oldposy -posy);
tempposz = (oldposz -posz);
if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16))) SendClientMessage(i, col1, len);
else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8))) SendClientMessage(i, col2, len);
else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4))) SendClientMessage(i, col3, len);
else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2))) SendClientMessage(i, col4, len);
else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) SendClientMessage(i, col5, len);
} else {
SendClientMessage(i, col1, len);
}
}
}
}
return 1;
}
EDIT: The first one I gave you should work fine, it is working for me. You are maybe doing something wrong.