Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // © copyright Liam Trott (Sa-mp Coder)
- /*
- ***************************************
- ******** AFK SCRIPT BY TROTTY *********
- ***************************************
- */
- #include <a_samp>
- #define GREEN 0x33AA33AA
- #define RED 0xAA3333AA
- new IsPlayerAway[MAX_PLAYERS];
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(!strcmp("/away", cmdtext))
- {
- new pName[MAX_PLAYER_NAME];
- new string[48];
- GetPlayerName(playerid, pName, sizeof(pName));
- format(string, sizeof(string), "%s is now Away from his/her keyboard.", pName);
- SendClientMessageToAll(RED, string);
- SetPlayerFacingAngle(playerid,0);
- TogglePlayerControllable(playerid, 0);
- IsPlayerAway[playerid] = 1;
- return 1;
- }
- if(!strcmp("/back", cmdtext))
- {
- new pName[MAX_PLAYER_NAME];
- new string[48];
- GetPlayerName(playerid, pName, sizeof(pName));
- format(string, sizeof(string), "%s has now got his/her fingers on the keyboard now ;)", pName);
- SendClientMessageToAll(GREEN, string);
- SetPlayerFacingAngle(playerid, 264.3768);
- TogglePlayerControllable(playerid, 1);
- IsPlayerAway[playerid] = 0;
- }
- return 0;
- }
- // © copyright Liam Trott (Sa-mp Coder)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement