Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Versão 1
- Detector(Float: radi, playerid, string[], color)
- {
- if(!IsPlayerConnected(playerid))
- return false;
- static Pos[3];
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- for(new i; i < GetMaxPlayers(); ++i)
- {
- if(IsPlayerConnected(i))
- {
- if(IsPlayerInRangeOfPoint(i, radi, Pos[0], Pos[1], Pos[2]))
- {
- SendClientMessage(i, color1, string);
- continue;
- }
- if(IsPlayerInRangeOfPoint(i, radi*2, Pos[0], Pos[1], Pos[2]))
- {
- SendClientMessage(i, color2, string);
- continue;
- }
- if(IsPlayerInRangeOfPoint(i, radi*3, Pos[0], Pos[1], Pos[2]))
- {
- SendClientMessage(i, color3, string);
- }
- }
- }
- return true;
- }
- //Versão 2
- Detector(Float: radi, playerid, string[], color)
- {
- if(!IsPlayerConnected(playerid))
- return false;
- static Pos[3];
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- for(new i; i < GetMaxPlayers(); i++)
- {
- if(!IsPlayerInRangeOfPoint(i, radi, Pos[0], Pos[1], Pos[2])) continue;
- SendClientMessage(i, color, string);
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment