#include <a_samp>
#define yellow 0xFFFF00AA
#define COLOR_YELLOW 0xFFFF00AA
new Text3D:label[MAX_PLAYERS];
public OnFilterScriptInit()
{
print(\"\\n--------------------------------------\");
print(\" Afk SYSTEM\");
print(\"--------------------------------------\\n\");
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(\"/afk\", cmdtext, true) == 0)
{
SendClientMessage(playerid, COLOR_YELLOW, \"You are now AFK, type /back to move again!\");
TogglePlayerControllable(playerid,0);
label[playerid] = Create3DTextLabel(\"AFK\",yellow,30.0,40.0,50.0,40.0,0);
Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);
new string3[70];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string3, sizeof(string3), \"%s is now Away from the keyboard!\", name);
SendClientMessageToAll(COLOR_YELLOW, string3);
}
if(strcmp(\"/back\", cmdtext, true) == 0)
{
SendClientMessage(playerid, COLOR_YELLOW, \"Welcome back!\");
TogglePlayerControllable(playerid,1);
new string3[70];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string3, sizeof(string3), \"%s is now Back!\", name);
SendClientMessageToAll(COLOR_YELLOW, string3);
Delete3DTextLabel(Text3D:label[playerid]);
return 1;
}
return 0;
}
Tessék átírod magyarra és jó is