Jump to content
  • 0

Cum pot pune afk sistem!


florin

Question

Salut va rog sa imi spuneti si mie cum as putea pune /afk sistem.O solutie ar fi sa il bag ca FS dar am prea multe FS si nu imi merge.Si as vrea sa il bag in GM dar nustiu cum??Ma puteti ajuta va rog.

 [
#include <a_samp>
new Text:afk;
new Text:back;
new Timer;
new newtext[41], dname[MAX_PLAYER_NAME];
#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" AFK System Loaded");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

#else

main()
{
	print("\n----------------------------------");
	print("AFK System UnLOaded");
	print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
afk = TextDrawCreate(17.0, 280.0, "~w~este acum ~r~AFK");
TextDrawBackgroundColor(afk, 255);
TextDrawFont(afk, 2);
TextDrawUseBox(afk, 1);
TextDrawBoxColor(afk, 0x00000044);
TextDrawTextSize(afk, 270.000000, 350.000000);
TextDrawAlignment(afk, 0);
TextDrawLetterSize(afk, 0.299999,1.000000);
TextDrawColor(afk,0x000000ff);
TextDrawSetOutline(afk, 1);
TextDrawSetProportional(afk, 1);


back = TextDrawCreate(17.0, 280.0, "~w~a revenit in ~r~Joaca");
TextDrawBackgroundColor(back, 255);
TextDrawFont(back, 2);
TextDrawUseBox(back, 1);
TextDrawBoxColor(back, 0x00000044);
TextDrawTextSize(back, 270.000000, 350.000000);
TextDrawAlignment(back, 0);
TextDrawLetterSize(back, 0.299999,1.000000);
TextDrawColor(afk,0x000000ff);
TextDrawSetOutline(back, 1);
TextDrawSetProportional(back, 1);

return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/afk", true) == 0)
{
GetPlayerName(playerid, dname, MAX_PLAYER_NAME);
format(newtext, sizeof(newtext), "~b~%s,~w~este acum ~r~AFK", dname);
TogglePlayerControllable(playerid,0);
SetPlayerVirtualWorld(playerid, 5);
TextDrawSetString(afk, newtext);
HideDraw(playerid);
TextDrawShowForAll(afk);
SetTimerEx("HideDraw", 3000, 0, "i", playerid);
KillTimer(Timer);
Timer = SetTimer("afk", 100, 1);
return 1;
}

if(strcmp(cmdtext, "/back", true) == 0)
{
GetPlayerName(playerid, dname, MAX_PLAYER_NAME);
format(newtext, sizeof(newtext), "~b~%s,~w~a ~r~revenit", dname);
TogglePlayerControllable(playerid,1);
SetPlayerVirtualWorld(playerid, 0);
TextDrawSetString(back, newtext);
HideDraw(playerid);
TextDrawShowForAll(back);
SetTimerEx("HideDraw", 3000, 0, "i", playerid);
KillTimer(Timer);
Timer = SetTimer("back", 100, 1);
return 1;
}
return 0;
}

forward HideDraw(playerid);
public HideDraw(playerid)
{

	TextDrawHideForPlayer(playerid, afk);
	TextDrawHideForPlayer(playerid, back);

 	return 1;
}
/code]

modelcopiacopia.png

 wde [We Drift Everywhere] clan!

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

P.S : Scuzati de reclama ! nu pot sai fut topicu lu acel baiat sa-l pun pe sa-mp.ro ! asa ca iam dat direct linku !

EDIT by stuntman: Se zice fur, nu fut =))

:))))))))))))))))))))))

app nui greu! e ft usor daca urmezi pasii!

u78ch.jpg

CHECK MY CHANNEL!

http://www.youtube.com/user/amysoica

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.