SA-MP Forums Archive
Awake From Keyboard (System) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Awake From Keyboard (System) (/showthread.php?tid=333691)



Awake From Keyboard (System) - Optimus_Sprite - 12.04.2012

Hi all.
I've been thinking how to make the system when a player goes into a pause, and it was attached to the 3D text with the report of the time.
Help to do this?


Re: Awake From Keyboard (System) - Faisal_khan - 12.04.2012

Try this:
pawn Код:
new
tempName[ MAX_PLAYERS ][ 24 ],
oldName[ MAX_PLAYERS ][ 24 ]
;
CMD:afk( playerid, params[ ] )
{
GetPlayerName( playerid, oldName[ playerid ], 24 );
format( tempName[ playerid ],24, "%s[AFK]", oldName[ playerid ] );
SetPlayerName( playerid, tempName[ playerid ] );
SetPlayerHealth(playerid,999999);
SendClientMessage(playerid, COLOR_GREEN, "You are now [AFK]!");
TogglePlayerControllable(playerid, false);
new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s Is now [AFK].", name);
SendClientMessageToAll(0xFF00FB, string);
}

CMD:back( playerid, params[ ] )
{
SendClientMessage(playerid, COLOR_GREEN,"You are now BACK");
new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s Is Now [BACK].", name);
SendClientMessageToAll(0xFF00FB, string);
SetPlayerName( playerid, oldName[ playerid ] );
SetPlayerHealth(playerid,100);
TogglePlayerControllable(playerid, true);
return 1;
}



Re: Awake From Keyboard (System) - Dan. - 12.04.2012

I would personally add a timer, because when a player is in a fight, he just types /afk and hes safe. So add a 10 second timer, and after that his health goes to the level u want.


Re: Awake From Keyboard (System) - Optimus_Sprite - 12.04.2012

You do not know how to read?
I do not need a team of care in AFK.
I need an automatic meter when the player is in pause.


Re: Awake From Keyboard (System) - Tomer!.$ - 12.04.2012

I actually wondered the same, would be nice if anyone will tell us.


Re: Awake From Keyboard (System) - Tomer!.$ - 13.04.2012

Anyone?


Re: Awake From Keyboard (System) - Tomer!.$ - 13.04.2012

Help?