Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Laisser les crédits pour le respect de l'auteur.
- #include <a_samp>
- #define COLOR_WHITE 0xFFFFFFFF
- new jAFK[MAX_PLAYERS];
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Système AFK par Jcvag44800");
- print("--------------------------------------\n");
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/afk", cmdtext, true, 10) == 0)
- {
- new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- if(jAFK[playerid] == 0)
- {
- SendClientMessage(playerid,COLOR_WHITE,"Vous êtes AFK, pour vous enlever AFK, taper la commande /afk de nouveau.");
- jAFK[playerid] = 1;
- TogglePlayerControllable(playerid,0);
- format(string,sizeof string,"%s est maintenant AFK.",name);
- SendClientMessageToAll(COLOR_WHITE,string);
- PlayerPlaySound(playerid, 1068, 0.0, 0.0, 0.0);
- return 1;
- }
- else
- {
- jAFK[playerid] = 0;
- TogglePlayerControllable(playerid,1);
- format(string,sizeof string,"%s n'est plus AFK.",name);
- SendClientMessageToAll(COLOR_WHITE,string);
- PlayerPlaySound(playerid,1098,0.0,0.0,0.0);
- return 1;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment