Advertisement
Johurt

[FNC] SendMessageToVirtualWorld

Jan 26th, 2013
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.42 KB | None | 0 0
  1. stock SendMessageToVirtualWorld(worldid, color, str[], Float:distance) // by Johurt
  2. {
  3.     new Float:pPos[3];
  4.     for(new p; p < MAX_PLAYERS; p++)
  5.     {
  6.         if(IsPlayerNPC(p) || !IsPlayerConnected(p)) continue;
  7.         GetPlayerPos(p, pPos[0], pPos[1], pPos[2]);
  8.         if(IsPlayerInRangeOfPoint(p, distance, pPos[0], pPos[1], pPos[2]) && GetPlayerVirtualWorld(p) == worldid)
  9.         {
  10.             SendClientMessage(p, color, str);
  11.         }
  12.     }
  13.     return 1;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement