How to make 3D the text afk?
#1

Hello!
How to make 3D the text over anybody when the player types/afk?
Here my command/afk:
Код:
if (strcmp("/afk", cmdtext, true, 10) == 0)
	{
	  GetPlayerName(playerid,playername,sizeof(playername));
		format(string,sizeof(string),".:: %s (ID: %d) ушел в AFK! ::.",playername,playerid);
		SendClientMessageToAll(COLOR_ERROR, string);
		return 1;
	}
And when entered this command that 3D the text disappeared

Код:
if (strcmp("/comeback", cmdtext, true, 10) == 0)
	{
	  GetPlayerName(playerid,playername,sizeof(playername));
		format(string,sizeof(string),".:: %s (ID: %d) вернулся из AFK! ::.",playername,playerid);
		SendClientMessageToAll(COLOR_YELLOW2, string);
		return 1;
	}
Please help who be
Reply
#2

Код:
new Text3D:afk[MAX_PLAYERS];
Код:
if (strcmp("/afk", cmdtext, true, 10) == 0)
	{
	  GetPlayerName(playerid,playername,sizeof(playername));
		format(string,sizeof(string),".:: %s (ID: %d) ушел в AFK! ::.",playername,playerid);
		SendClientMessageToAll(COLOR_ERROR, string);
		afk[playerid] = Create3DTextLabel("afk",0xff0000FF,0.0,0.0,0.0,40.0,0);
		Attach3DTextLabelToPlayer(afk[playerid], playerid, 0.0, 0.0, 0.0)
		return 1;
	}
Код:
if (strcmp("/comeback", cmdtext, true, 10) == 0)
	{
	  GetPlayerName(playerid,playername,sizeof(playername));
		format(string,sizeof(string),".:: %s (ID: %d) вернулся из AFK! ::.",playername,playerid);
		SendClientMessageToAll(COLOR_YELLOW2, string);
		DeletePlayer3DTextLabel(playerid,PlayerText3D:afk[playerid]);
		return 1;
	}
Reply
#3

Error has given out:

Код:
C:\Documents and Settings\Арам\Рабочий стол\Мод SF.Gang 2оо9\SF-Gang_1.8[srv].pwn(3308) : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg")
C:\Documents and Settings\Арам\Рабочий стол\Мод SF.Gang 2оо9\SF-Gang_1.8[srv].pwn(3818) : error 001: expected token: ";", but found "return"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#4

You can also use SetPlayerChatBubble.
Reply
#5

And how to rectify an error please help?
Reply
#6

Quote:
Originally Posted by Aram555
And how to rectify an error please help?
Read it, go to the line, and fix it.
Reply
#7

I do not understand(
Reply
#8

You have this error:
Код:
(3818) : error 001: expected token: ";", but found "return"
This mean, on line 3818 (or near this line), there is a "return" found, and the compiler expected a ";" before it, to end the statement.

pawn Код:
Attach3DTextLabelToPlayer(afk[playerid], playerid, 0.0, 0.0, 0.0) // <- here
return 1;
Reply
#9

Thanks. has corrected
Did not notice that it is not necessary ";"
Reply
#10

When I enter this command:
Код:
if (strcmp("/comeback", cmdtext, true, 10) == 0)
	{
	  GetPlayerName(playerid,playername,sizeof(playername));
		format(string,sizeof(string),".:: %s (ID: %d) вернулся из AFK! ::.",playername,playerid);
		SendClientMessageToAll(COLOR_YELLOW2, string);
		DeletePlayer3DTextLabel(playerid,PlayerText3D:afk[playerid]);
		return 1;
	}
3D the text does not disappear
How to make that has disappeared?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)