Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <core>
- #pragma tabsize 0
- #define orange 0xFF9900AA
- #define COLOR_RED 0xAA3333AA
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_WHITE 0xFFFFFFAA
- new InAFK[MAX_PLAYERS];
- new Text3D:LeTmE[MAX_PLAYERS];
- //------------------------------------------------------------------------------------------------------
- main()
- {
- print("\n----------------------------------");
- print("AFK Sysyem By LeTmE");
- print("----------------------------------\n");
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/AFK", cmdtext, true, 10) == 0){
- new string[46];
- format(string,sizeof(string),"[LeTmE] AFK נכנס למצב %s השחקן",GetName(playerid));
- SendClientMessageToAll(orange,string),TogglePlayerControllable(playerid,0),InAFK[playerid]=1,SendClientMessage(playerid,COLOR_YELLOW,"[LeTmE] AFK נכנסתה למצב");
- LeTmE[playerid] = Create3DTextLabel("AFK השחקן נמצא במצב",COLOR_WHITE,30.0,40.0,50.0,40.0,0),Attach3DTextLabelToPlayer(LeTmE[playerid], playerid, 0.0, 0.0, 0.7),GameTextForPlayer(playerid,"AFK ~G~On",2000,0);
- return 1;
- }
- if (strcmp("/UnAFK", cmdtext, true, 10) == 0){
- new string[46];
- format(string,sizeof(string),"[LeTmE] AFK יצא ממצב %s השחקן",GetName(playerid));
- Delete3DTextLabel(Text3D:LeTmE[playerid]),SendClientMessageToAll(orange,string),TogglePlayerControllable(playerid,1),InAFK[playerid]=0,SendClientMessage(playerid,COLOR_YELLOW,"[LeTmE] AFK יצאתה ממצב"),GameTextForPlayer(playerid,"AFK ~R~Off",2000,0);
- return 1;
- }
- if(InAFK[playerid] == 1)return SendClientMessage(playerid,COLOR_RED, "[LeTmE] AFK אינך יכול לבצע פקודות במצב");
- return 0;
- }
- stock GetName(playerid) { new name[24]; GetPlayerName(playerid,name,24); return name; }
Advertisement
Add Comment
Please, Sign In to add comment