Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.93 KB | None | 0 0
  1. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  2. {
  3.     new
  4.         pName[ MAX_PLAYER_NAME ],
  5.         sString[ 128 ];
  6.         GetPlayerName(clickedplayerid, pName, MAX_PLAYER_NAME );
  7.        
  8.     if(GetPlayerInterior(clickedplayerid) != 0)
  9.     {
  10.         format( sString, sizeof( sString ), "%s (ID:%d) is hiding in an interior!",pName,clickedplayerid,zones[j][zone_name]);
  11.         SendClientMessage( playerid, COLOR_YELLOW, sString );
  12.         return 1;
  13.     }
  14.     else
  15.     {
  16.         for(new j = 0; j <sizeof(zones); j++)
  17.         {
  18.             if(IsPlayerInZone(clickedplayerid, j))
  19.             {
  20.                 GetPlayerName(clickedplayerid, pName, MAX_PLAYER_NAME );
  21.  
  22.                 if ( !IsPlayerConnected( clickedplayerid ) )
  23.                     return SendError( playerid, "Player is not connected." );
  24.  
  25.                 format( sString, sizeof( sString ), "%s (ID:%d) is located at \"%s\"",pName,clickedplayerid,zones[j][zone_name]);
  26.                 SendClientMessage( playerid, COLOR_YELLOW, sString );
  27.                 return 1;
  28.             }
  29.         }
  30.     }
  31.     return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement