Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:action(playerid, params[])
- {
- static
- Text3D: player_action_textid[MAX_PLAYERS] = {Text3D: INVALID_TEXT_DRAW, ...};
- if (_:player_action_textid[playerid] == INVALID_TEXT_DRAW)
- {
- new
- description[128];
- if (sscanf(params, !"s[128]", description))
- return SendClientMessage(playerid, -1, !"/action [текст]");
- static const
- fmt_str0[] = "%s\n(( by %s[%i] ))";
- new
- str0[sizeof (fmt_str0) + (-2 + 90) + (-2 + MAX_PLAYER_NAME + 3)],
- Float: x,
- Float: y,
- Float: z
- ;
- format(str0, sizeof (str0), fmt_str0, description, /*ник игрока*/, playerid);
- GetPlayerPos(playerid, x, y, z);
- player_action_textid[playerid] = Create3DTextLabel(str0, 0xDD90FFFF,
- x, y, z, 10.0, GetPlayerVirtualWorld(playerid), 1);
- SendClientMessage(playerid, -1, !"Введите команду снова, чтобы удалить текст.");
- }
- else
- {
- Delete3DTextLabel(player_action_textid[playerid]);
- player_action_textid[playerid] = Text3D: INVALID_TEXT_DRAW;
- SendClientMessage(playerid, -1, !"Вы удалили свой текст.");
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement