Advertisement
Mionelal

sendsplitmsg example

Dec 8th, 2015
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.58 KB | None | 0 0
  1. public OnPlayerText ( playerid, text [] ) {
  2.     new fString [ 256 ];
  3.  
  4.     if ( strlen ( fString ) > 144) {
  5.         return false;
  6.     }
  7.  
  8.     format ( fString, sizeof ( fString ),
  9.         "%s says: %s", GetName (playerid), text );
  10.  
  11.     SendNearbyMessage ( playerid, 0xffffffAA, fString, 5.0 );
  12.  
  13.     return false;
  14. }
  15.  
  16. SendNearbyMessage ( playerid, color, string [ 256 ], Float: radius ) {
  17.     new Float: pX, Float: pY, Float: pZ;
  18.     GetPlayerPos ( playerid, pX, pY, pZ );
  19.  
  20.     foreach(new i: Player) {
  21.         if ( IsPlayerInRangeOfPoint ( i, radius, pX, pY, pZ ) ) {
  22.  
  23.             SendSplitMessage ( i, color, string );
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement