Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.11 KB | None | 0 0
  1. CMD:action(playerid, params[])
  2. {
  3.     static
  4.         Text3D: player_action_textid[MAX_PLAYERS] = {Text3D: INVALID_TEXT_DRAW, ...};
  5.     if (_:player_action_textid[playerid] == INVALID_TEXT_DRAW)
  6.     {
  7.         new
  8.             description[128];
  9.         if (sscanf(params, !"s[128]", description))
  10.             return SendClientMessage(playerid, -1, !"/action [текст]");
  11.        
  12.         static const
  13.             fmt_str0[] = "%s\n(( by %s[%i] ))";
  14.         new
  15.             str0[sizeof (fmt_str0) + (-2 + 90) + (-2 + MAX_PLAYER_NAME + 3)],
  16.            
  17.             Float: x,
  18.             Float: y,
  19.             Float: z
  20.         ;
  21.         format(str0, sizeof (str0), fmt_str0, description, /*ник игрока*/, playerid);
  22.         GetPlayerPos(playerid, x, y, z);
  23.        
  24.         player_action_textid[playerid] = Create3DTextLabel(str0, 0xDD90FFFF,
  25.             x, y, z, 10.0, GetPlayerVirtualWorld(playerid), 1);
  26.         SendClientMessage(playerid, -1, !"Введите команду снова, чтобы удалить текст.");
  27.     }
  28.     else
  29.     {
  30.         Delete3DTextLabel(player_action_textid[playerid]);
  31.         player_action_textid[playerid] = Text3D: INVALID_TEXT_DRAW;
  32.         SendClientMessage(playerid, -1, !"Вы удалили свой текст.");
  33.     }
  34.    
  35.     return 1;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement