[FilterScript] Simple afk,brb,pm,togpm afk systems with reason..!!
#1

Simple afk.brb systems


Create/Edit System By Hazko

Код:
//::::::::::::::::::::::::::::::::::::::: :
//Create/Edit system by Hazko:::  ::::       :
//::::::::::::::::::::::::::::::::::::::::       :
//                                          : : : ;
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//If you want some things to be ashamed Ask and I might can prepare:::
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
#include <a_samp>
#include <streamer>
#include <zcmd>
#include <sscanf2>
#define COLOR_YELLOW 0xFFFF00AA

new PMEnabled[MAX_PLAYER_NAME];

CMD:afk(playerid, params[], help)
{
        new reason[64];
        if(sscanf(params,"s[64]", reason)) return SendClientMessage(playerid, COLOR_YELLOW, "{6347AA} /afk [reason]");
        TogglePlayerControllable(playerid, 0);
        new string[64], pName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
        format(string, sizeof(string), "%s is now AFK Reason: %s.",pName, reason);
        SendClientMessageToAll(0xFF0000AA,string);
        return 1;
}

CMD:brb(playerid, params[], help)
{
        new reason[64];
        if(sscanf(params,"s[64]", reason)) return SendClientMessage(playerid, COLOR_YELLOW, "{6347AA} /brb [reason]");
        TogglePlayerControllable(playerid, 0);
        new string[64], pName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
        format(string, sizeof(string), "%s is now BRB Reason: %s.",pName, reason);
        SendClientMessageToAll(0xFF0000AA,string);
        return 1;
}

CMD:back(playerid, params [])
{
    new string[129], pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
    SendClientMessage(playerid, COLOR_YELLOW, "You are no longer AFK/BRB.");
    format(string,sizeof string, "%s is no longer AFK/BACK.",pName);
    SendClientMessageToAll(0xFF0000AA,string);
    TogglePlayerControllable(playerid, 1);
    return 1;
}

// NEW PM WITH TOGPM
CMD:pm(playerid, params [ ] )
{
    if(IsPlayerConnected(playerid))
    {
        new pID, Message[60],playername[MAX_PLAYER_NAME],targetName[MAX_PLAYER_NAME],string[128],string2[128];
        if(sscanf(params, "us[60]", pID, Message)) return SendClientMessage(playerid, 0xAFAFAFAA, "{6347AA} /pm [PlayerID/PlayerName] [Message]");
        if(pID == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xAFAFAFAA, "Invalid PlayerID/PlayerName");
        if(PMEnabled[playerid] == 0) return SendClientMessage(playerid, 0xAFAFAFAA, "This player blocked Incoming Private Messages");
        GetPlayerName(pID, targetName, sizeof(targetName));
        GetPlayerName(playerid, playername, sizeof(playername));
        format(string, sizeof(string), "PM Message from %s: %s", playername, Message);
        format(string2, sizeof(string2), "PM Message sent to %s: %s", targetName, Message);
        SendClientMessage(playerid, COLOR_YELLOW, string2);
        SendClientMessage(pID, COLOR_YELLOW, string);
    }
    return 1;
}

CMD:togpm( playerid, params[ ] )
{
    if(isnull(params)) return SendClientMessage(playerid, 0xFFFFFFFF, "CMD: /togpm [on/off]");
    if(strcmp(params, "on", true ) == 0 )
    {
        PMEnabled[playerid] = 1;
        SendClientMessage(playerid, 0x00FF00FF, "You have unblocked your Personal Messaging arrival.");
    }
    else if( strcmp( params, "off", true ) == 0 )
    {
        PMEnabled[playerid] = 0;
        SendClientMessage(playerid, 0xAA3333AA, "You have blocked Personal Messages from arriving.");
    }
    else SendClientMessage(playerid, -1,"CMD: /togpm [on/off]");
    return 1;
}
// NEW PM WITH TOGPM
If you want some things to be ashamed Ask and I might can prepare
Reply
#2

hmm i think you need to make an command like /afklist to know who is in /Afk Mode
Reply
#3

Quote:
Originally Posted by Raza2013
Посмотреть сообщение
hmm i think you need to make an command like /afklist to know who is in /Afk Mode
agree with your option.
Reply
#4

add strcmp pls . i use strcmp on my gamemode
Reply
#5

Quote:
Originally Posted by Guest123
Посмотреть сообщение
add strcmp pls . i use strcmp on my gamemode
just convert it by yourself you lazy ass!
Reply
#6

many error i got after i convert it
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)