WARNING EPIC CODE 0 Odesláno: 10. Květen, 2014 Share Odesláno: 10. Květen, 2014 Prosím pomůžete mi ? .. Potřeboval bych .. AFK SYSTEM s navratem /afk .. ďekuju Link to comment Share on other sites More sharing options...
0 RIP 5 Odesláno: 10. Květen, 2014 Share Odesláno: 10. Květen, 2014 #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, "You are now 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; } Link to comment Share on other sites More sharing options...
0 WARNING EPIC CODE 0 Odesláno: 10. Květen, 2014 Author Share Odesláno: 10. Květen, 2014 ďekuju ale ja nechci s navratem /back ja chci s navratem /afk Link to comment Share on other sites More sharing options...
0 RIP 5 Odesláno: 10. Květen, 2014 Share Odesláno: 10. Květen, 2014 ďekuju ale ja nechci s navratem /back ja chci s navratem /afk Neni to jedno, si to oprav .. Link to comment Share on other sites More sharing options...
0 Miroslav 0 Odesláno: 10. Květen, 2014 Share Odesláno: 10. Květen, 2014 #include <a_samp> #define FUTURE_TIME (60) COMMAND:afk(playerid,params[]){ new Name[32],string[128]; GetPlayerName(playerid, Name, 32); if(GetPVarInt(playerid,"AFK") == 0){ if(GetPVarInt(playerid,"AFK_TIME") > gettime()){ new str[128]; format(str,128,"[AFK] AFK můžeš být až za %i sekund.",GetPVarInt(playerid,"AFK_TIME")-gettime()); SendClientMessage(playerid,-1,str); }else{ strins(Name, "[AFK]", 0); SetPlayerName(playerid, Name); format(string,128,"Hráč %s je nyní AFK (\"%s\").",Name,params); SendClientMessageToAll(-1,string); TogglePlayerControllable(playerid,false); SetPVarInt(playerid,"AFK_World",GetPlayerVirtualWorld(playerid)); ExSetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(playerid)+2012); SetPVarInt(playerid,"AFK",1); } }else{ strdel(Name, 0, 5); SetPlayerName(playerid,Name); format(string,128,"Hráč %s je zpět.",Name); SendClientMessageToAll(-1,string); new Future = gettime() + FUTURE_TIME; SetPVarInt(playerid,"AFK_TIME",Future); TogglePlayerControllable(playerid,true); SetPlayerVirtualWorld(playerid,GetPVarInt(playerid,"AFK_World")); DeletePVar(playerid,"AFK"); DeletePVar(playerid,"AFK_World"); } return 1; } Link to comment Share on other sites More sharing options...
0 WARNING EPIC CODE 0 Odesláno: 10. Květen, 2014 Author Share Odesláno: 10. Květen, 2014 ďekuju ;3 Poporsíl by som LOCK Link to comment Share on other sites More sharing options...
Dotaz
WARNING EPIC CODE 0
Prosím pomůžete mi ? .. Potřeboval bych .. AFK SYSTEM s navratem /afk .. ďekuju
Link to comment
Share on other sites
5 odpovědí na tuto otázku
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now