Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #define yellow 0xFFFF00AA
- #define COLOR_YELLOW 0xFFFF00AA
- new Text3D:label[MAX_PLAYERS];
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Afk SYSTEM by ChuckSkill");
- print("--------------------------------------\n");
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(strcmp("/afk", cmdtext, true) == 0)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "Ti si sad AFK ako zelis da se vratis nazad kucaj /back");
- 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 je daleko od tastature!", name);
- SendClientMessageToAll(COLOR_YELLOW, string3);
- }
- if(strcmp("/back", cmdtext, true) == 0)
- {
- SendClientMessage(playerid, COLOR_YELLOW, "DOBRODOSAO NAZAD!");
- 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;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement