/drag - /mask - /fooc
#1

Hello guys, If you're a NG:RP edit scripter. You must know those commands in title and where they are used for.
Can anyone help make those commands? I wanna learn scripting and maybe someone can help me do that 3 commands
Reply
#2

pawn Код:
CMD:drag(playerid, params[])
{
    if(IsACop(playerid))
    {
        new string[128], giveplayerid;
        if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /drag [playerid]");

        if(IsPlayerConnected(giveplayerid))
        {
            if(GetPVarInt(giveplayerid, "PlayerCuffed") == 2)
            {
                if(IsPlayerInAnyVehicle(playerid)) return SendClientMessageEx(playerid, COLOR_WHITE, " You must be out of the vehicle to use this command.");
                if(GetPVarInt(giveplayerid, "BeingDragged") == 1)
                {
                    SendClientMessageEx(playerid, COLOR_WHITE, " That player is already being dragged. ");
                    return 1;
                }
                new Float:dX, Float:dY, Float:dZ;
                GetPlayerPos(giveplayerid, dX, dY, dZ);
                if(!IsPlayerInRangeOfPoint(playerid, 5.0, dX, dY, dZ))
                {
                    SendClientMessageEx(playerid, COLOR_GRAD2, " That suspect is not near you.");
                    return 1;
                }
                format(string, sizeof(string), "* %s is now dragging you.", GetPlayerNameEx(playerid));
                SendClientMessageEx(giveplayerid, COLOR_WHITE, string);
                format(string, sizeof(string), "* You are now dragging %s, you can move now.", GetPlayerNameEx(giveplayerid));
                SendClientMessageEx(playerid, COLOR_WHITE, string);
                format(string, sizeof(string), "* %s grabs grabs %s's arm tight as he drags them with him.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                SendClientMessageEx(playerid, COLOR_WHITE, "You are now dragging the suspect, press the '{AA3333}FIRE{FFFFFF}' button to stop.");
                SetPVarInt(giveplayerid, "BeingDragged", 1);
                SetPVarInt(playerid, "DraggingPlayer", giveplayerid);
            }
            else
            {
                SendClientMessageEx(playerid, COLOR_WHITE, " The specified player is not cuffed !");
            }
        }
    }
    else
    {
        SendClientMessageEx(playerid, COLOR_GREY, "   You are not a LEO ! ");
        return 1;
    }
    return 1;
}
Reply
#3

pawn Код:
CMD:fooc(playerid, params[])
{
    new string[128];
    if(isnull(params)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: (/fooc) [faction ooc chat]");

    new rank[64], division[16];
    switch (PlayerInfo[playerid][pMember]) // employer/rank/division data is pulled from here
    {
    case 1:
        {
            switch(PlayerInfo[playerid][pRank])
            {
            case 1: rank = "Officer";
            case 2: rank = "Detective";
            case 3: rank = "Sergeant";
            case 4: rank = "Lieutenant";
            case 5: rank = "Captain";
            case 6: rank = "Chief Of Police";
            default: rank = "Cadet";
            }
            switch(PlayerInfo[playerid][pDivision])
            {
            case 2: division = " (II)";
            case 3: division = " (FTO)";
            case 4: division = " (IA)";
            case 5: division = " (TSG)";
            default: division = "";
            }
            format(string, sizeof(string), "[FOOC] %s%s %s: %s, over.", rank, division, GetPlayerNameEx(playerid), params);
            SendRadioMessage(1, RADIO, string);
        }
    case 2:
        {
            switch(PlayerInfo[playerid][pRank])
            {
            case 1: rank = "Staff";
            case 2: rank = "Agent";
            case 3: rank = "Senior Agent";
            case 4: rank = "Special Agent";
            case 5: rank = "Assistant Director";
            case 6: rank = "Director";
            default: rank = "Intern";
            }
            switch(PlayerInfo[playerid][pDivision])
            {
            case 2: division = " (GU)";
            case 3: division = " (FAN)";
            case 4: division = " (CID)";
            case 5: division = " (IA)";
            case 6: division = " (NSB)";
            default: division = "";
            }
            format(string, sizeof(string), "[FOOC] %s%s %s: %s, over.", rank, division, GetPlayerNameEx(playerid), params);
            SendRadioMessage(2, RADIO, string);
        }
    case 3:
        {
            switch(PlayerInfo[playerid][pRank])
            {
                case 1: rank = "Officer";
                case 2: rank = "Detective";
                case 3: rank = "Sergeant";
                case 4: rank = "Lieutenant";
                case 5: rank = "Lt. Commander";
                case 6: rank = "Commander";
                default: rank = "Trainee";
            }
            switch(PlayerInfo[playerid][pDivision])
            {
                case 1: division = " (HR)";
                case 2: division = " (ERT)";
                case 3: division = " (IA)";
                case 4: division = " (SO)";
                default: division = "";
            }
            format(string, sizeof(string), "[FOOC] %s%s %s: %s, over.", rank, division, GetPlayerNameEx(playerid), params);
            SendRadioMessage(3, RADIO, string);
        }
        case 4:
        {
            switch(PlayerInfo[playerid][pRank])
            {
                case 1: rank = "EMT Intermediate";
                case 2: rank = "EMT Paramedic";
                case 3: rank = "Lieutenant";
                case 4: rank = "Captain";
                case 5: rank = "Deputy Chief";
                case 6: rank = "Chief";
                default: rank = "EMT Basic";
            }
            switch(PlayerInfo[playerid][pDivision])
            {
                case 1: division = " (FD)";
                case 2: division = " (LF)";
                case 3: division = " (T&R)";
                default: division = "";
            }

            format(string, sizeof(string), "[FOOC] %s%s %s: %s, over.", rank, division, GetPlayerNameEx(playerid), params);
            SendRadioMessage(4, TEAM_CYAN_COLOR, string);
        }
    case 5:
        {
            switch(PlayerInfo[playerid][pRank])
            {
            case 1: rank = "Clerk of Court";
            case 2: rank = "District Attorney";
            case 3: rank = "District Judge";
            case 4: rank = "Appellate Judge";
            case 5: rank = "Associate Justice of the Supreme Court";
            case 6: rank = "Chief Justice of the Supreme Court";
            default: rank = "Clerk of Court";
            }
            format(string, sizeof(string), "[FOOC] %s %s: %s, over.", rank, GetPlayerNameEx(playerid), params);
            SendRadioMessage(5, RADIO, string);
        }
    case 6:
        {
            switch(PlayerInfo[playerid][pRank])
            {
                case 1: rank = "Body Guard";
                case 2: rank = "Driver";
                case 3: rank = "Senior Bodyguard";
                case 4: rank = "Secret Agent";
                case 5: rank = "Deputy Prime Minister";
                case 6: rank = "Prime Minister";
                default: rank = "Rookie Guard";
            }
            format(string, sizeof(string), "[FOOC] %s %s: %s, over.", rank, GetPlayerNameEx(playerid), params);
            SendRadioMessage(6, RADIO, string);
        }
    case 7:
        {
            switch(PlayerInfo[playerid][pRank])
            {
            case 1: rank = "Deputy";
            case 2: rank = "Senior Deputy";
            case 3: rank = "Supervisory";
            case 4: rank = "Special Deputy";
            case 5: rank = "Deputy Sheriff";
            case 6: rank = "Sheriff";
            default: rank = "Cadet";
            }
            switch(PlayerInfo[playerid][pDivision])
            {
            case 2: division = " (TET)";
            case 3: division = " (SCU)";
            case 4: division = " (SORT)";
            case 5: division = " (FTO)";
            default: division = "";
            }
            format(string, sizeof(string), "[FOOC] %s%s %s: %s, over.", rank, division, GetPlayerNameEx(playerid), params);
            SendRadioMessage(7, RADIO, string);
        }
    case 9:
        {
            switch(PlayerInfo[playerid][pRank])
            {
                case 1: rank = "Local Reporter";
                case 2: rank = "Local Editor";
                case 3: rank = "Network Anchor";
                case 4: rank = "Network Editor";
                case 5: rank = "Asst. Network Producer";
                case 6: rank = "Network Producer";
                default: rank = "Intern";
            }
            switch(PlayerInfo[playerid][pDivision])
            {
                case 1: division = " (Security)";
                case 2: division = " (IA)";
                case 3: division = " (TS)";
                case 4: division = " (TnR)";
                default: division = "";
            }
            format(string, sizeof(string), "[FOOC] %s%s %s: %s, over.", rank, division, GetPlayerNameEx(playerid), params);
            SendRadioMessage(9, TEAM_NEWS_COLOR, string);
        }
    case 11:
        {
            switch(PlayerInfo[playerid][pRank])
            {
                case 0: rank = "Private";
                case 1: rank = "Corporal";
                case 2: rank = "Sergeant";
                case 3: rank = "Lieutenant";
                case 4: rank = "Captain";
                case 5: rank = "Major";
                case 6: rank = "General";
                default: rank = "Private";
            }
            switch(PlayerInfo[playerid][pDivision])
            {
                case 1: division = " (AIR)";
                case 2: division = " (ARM)";
                case 3: division = " (VET)";
                case 4: division = " (AIR SF)";
                case 5: division = " (ARM SF)";
                case 6: division = " (INF)";
            }
            format(string, sizeof(string), "[FOOC] %s%s %s: %s, over.", rank, division, GetPlayerNameEx(playerid), params);
            SendRadioMessage(11, COLOR_NG, string);
        }
    case 12:
        {
            switch(PlayerInfo[playerid][pRank])
            {
                case 1: rank = "Citizen";
                case 2: rank = "People's Representative";
                case 3: rank = "Tribal Representative";
                case 4: rank = "Mayor";
                case 5: rank = "Ruling Council Member";
                case 6: rank = "Executive Officer of RC";
                default: rank = "Citizen";
            }
            switch(PlayerInfo[playerid][pDivision])
            {
                case 1: division = "";
                case 2: division = " (AF)";
                case 3: division = " (ES)";
                case 4: division = " (DC)";
                default: division = "";
            }
            format(string, sizeof(string), "[FOOC] %s%s %s: %s, over.", rank, division, GetPlayerNameEx(playerid), params);
            SendRadioMessage(12, COLOR_TR, string);
        }
    case 13:
        {
            switch(PlayerInfo[playerid][pRank])
            {
                case 1: rank = "Probational Agent";
                case 2: rank = "Special Agent";
                case 3: rank = "Senior Field Agent";
                case 4: rank = "Intelligence Agent";
                case 5: rank = "Deputy Director";
                case 6: rank = "Director";
                default: rank = "Liaison Officer";
            }
            switch(PlayerInfo[playerid][pDivision])
            {
                case 1: division = "(SAD)";
                case 2: division = "(CCNC)";
                case 3: division = "(NCS)";
                case 4: division = "(OTA)";
                case 5: division = "(CCAG)";
                default: division = "";
            }
            format(string, sizeof(string), "[FOOC] %s%s %s: %s, over.", rank, division, GetPlayerNameEx(playerid), params);
            SendRadioMessage(13, COLOR_CIA, string);
        }
        case 14:
        {
            switch(PlayerInfo[playerid][pRank])
            {
                case 1: rank = ":Correction Officer";
                case 2: rank = "Correction Captain";
                case 3: rank = "Prisoner Transport";
                case 4: rank = "Deputy Chief";
                case 5: rank = "Chief of Department";
                case 6: rank = "Commissioner of Department";
                default: rank = "Officer";
            }
            format(string, sizeof(string), "[FOOC] %s %s: %s, over.", rank, GetPlayerNameEx(playerid), params);
            SendRadioMessage(14, RADIO, string);
        }
        case 15:
        {
            switch(PlayerInfo[playerid][pRank])
            {
                case 1: rank = "Junior Agent";
                case 2: rank = "Agent";
                case 3: rank = "Senior Sergeant";
                case 4: rank = "Special Agent";
                case 5: rank = "Assistant Director";
                case 6: rank = "Director";
                default: rank = "Cadet";
            }
            switch(PlayerInfo[playerid][pDivision])
            {
                case 1: division = " (CID)";
                case 2: division = " (SWAT)";
                case 3: division = " (IA)";
                case 4: division = " (SO)";
                default: division = "";
            }
            format(string, sizeof(string), "[FOOC] %s%s %s: %s **", rank, division, GetPlayerNameEx(playerid), params);
            SendRadioMessage(15, RADIO, string);
        }
    default:
        {
            SendClientMessageEx(playerid,COLOR_GRAD2,"You're not in a faction.");
            return 1;
        }
    }
    format(string, sizeof(string), "(Faction OOC Chat) %s",params);
    SetPlayerChatBubble(playerid,string,COLOR_WHITE,15.0,5000);
    return 1;
}
Reply
#4

Quote:
Originally Posted by Danialdano
Посмотреть сообщение
pawn Код:
CMD:drag(playerid, params[])
{
    if(IsACop(playerid))
    {
        new string[128], giveplayerid;
        if(sscanf(params, "u", giveplayerid)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /drag [playerid]");

        if(IsPlayerConnected(giveplayerid))
        {
            if(GetPVarInt(giveplayerid, "PlayerCuffed") == 2)
            {
                if(IsPlayerInAnyVehicle(playerid)) return SendClientMessageEx(playerid, COLOR_WHITE, " You must be out of the vehicle to use this command.");
                if(GetPVarInt(giveplayerid, "BeingDragged") == 1)
                {
                    SendClientMessageEx(playerid, COLOR_WHITE, " That player is already being dragged. ");
                    return 1;
                }
                new Float:dX, Float:dY, Float:dZ;
                GetPlayerPos(giveplayerid, dX, dY, dZ);
                if(!IsPlayerInRangeOfPoint(playerid, 5.0, dX, dY, dZ))
                {
                    SendClientMessageEx(playerid, COLOR_GRAD2, " That suspect is not near you.");
                    return 1;
                }
                format(string, sizeof(string), "* %s is now dragging you.", GetPlayerNameEx(playerid));
                SendClientMessageEx(giveplayerid, COLOR_WHITE, string);
                format(string, sizeof(string), "* You are now dragging %s, you can move now.", GetPlayerNameEx(giveplayerid));
                SendClientMessageEx(playerid, COLOR_WHITE, string);
                format(string, sizeof(string), "* %s grabs grabs %s's arm tight as he drags them with him.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
                ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                SendClientMessageEx(playerid, COLOR_WHITE, "You are now dragging the suspect, press the '{AA3333}FIRE{FFFFFF}' button to stop.");
                SetPVarInt(giveplayerid, "BeingDragged", 1);
                SetPVarInt(playerid, "DraggingPlayer", giveplayerid);
            }
            else
            {
                SendClientMessageEx(playerid, COLOR_WHITE, " The specified player is not cuffed !");
            }
        }
    }
    else
    {
        SendClientMessageEx(playerid, COLOR_GREY, "   You are not a LEO ! ");
        return 1;
    }
    return 1;
}
Alright, Thanks.
I'll hope it will work
Reply
#5

MASK SYSTEM TUTORIAL - https://sampforum.blast.hk/showthread.php?tid=327607

EDIT: I made you /fooc to scroll up
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)