[FilterScript] F.A.S. : Frequently Asked Scripts
#1

Hi.
I've noticed that people ask alot the same questions. Especially the /me command..
So I'm now gonna post them. No need to ask it anymore after this post.
For commands, I'll use ZCMD(+SSCANF)

Basic colors
Put these above in your script, below the includes
pawn Код:
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_RED 0xFF0000AA
#define COLOR_GREEN 0x00FF00AA
#define COLOR_BLUE 0x0000FFAA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_ORANGE 0xFFAA00AA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GRAY COLOR_GREY //for those who prefer using COLOR_GRAY instead of COLOR_GREY)
* Kwarde command - Show an action of your character (eg. '* Kwarde is dying' (/me is dying)
NOTE: Global chat! Not usefull for RL servers, unless if you edit it
pawn Код:
CMD:me(playerid, params[])
{
    new pName[25], str[128];
    if(!strlen(params[0])) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /me [action]");
    GetPlayerName(playerid, pName, 25);
    format(str, 128, "%s %s", pName, str);
    SendClientMessageToAll(COLOR_YELLOW, str);
    return 1;
}
/do command - Suggest an action (idk how to explain). eg. "/do checking license." : "Checking license. Do you have one? (( Kevin_Warde ))
NOTE: Global chat! Not usefull for RL servers, unless if you edit it
pawn Код:
CMD:do(playerid, params[])
{
    new pName[25], str[128];
    if(!strlen(params[0])) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /do [action]");
    GetPlayerName(playerid, pName, 25);
    format(str, 128, "%s (( %s ))", str, pName);
    SendClientMessageToAll(COLOR_ORANGE, str);
    return 1;
}
/mute command (+ script) - Prevent a player to talk in the normal chat
NOTE: Will not work for eg. /pm commands
pawn Код:
// Global variable. Don't put it in a command, callback or function. Place it below the defines and includes
new bool:kMuted[MAX_PLAYERS];

// Put this on OnPlayerConnect
kMuted[strval(params[0])] = false;

// Put this in OnPlayerText
if(kMuted[playerid]){
    SendClientMessage(playerid, COLOR_RED, "ERROR: You are muted!");
    return 0;
}

// The command
CMD:mute(playerid, params[])
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "ERROR: You are not a RCON admin!");
    if(!strlen(params[0])) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /mute [playerid]");
    if(!IsPlayerConnected(strval(params[0]))) return SendClientMessage(playerid, COLOR_RED, "ERROR: Given player ID not connected");
    if(kMuted[strval(params[0])]){
        kMuted[strval(params[0])] = false;
        SendClientMessage(playerid, COLOR_GREEN, "* The player has been unmuted.");
        SendClientMessage(strval(params[0]), COLOR_GREEN, "* You have been unmuted by an administrator.");
    }
    else{
        kMuted[strval(params[0])] = true;
        SendClientMessage(playerid, COLOR_GREEN, "* The player has been muted.");
        SendClientMessage(strval(params[0]), COLOR_RED, "* You have been muted by an administrator!");
    }
    return 1;
}
/explode - Will explode a player.
pawn Код:
CMD:explode(playerid, params[])
{
    new Float:pPos[3];
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "ERROR: You are not a RCON administrator.");
    if(!IsPlayerConnected(strval(params[0]))) return SendClientMessage(playerid, COLOR_RED, "ERROR: Given player ID is not online");
    GetPlayerPos(strval(params[0]), pPos[0], pPos[1], pPos[2]);
    CreateExplosion(pPos[0], pPos[1], pPos[2], 11, 1.5);
    SendClientMessage(playerid, COLOR_GREEN, "* Player has been exploded");
    return 1;
}
Gang System
This one has been made by Cameltoe.
Here's the script: https://sampforum.blast.hk/showthread.php?tid=243214
It's using mysql+sscanf+zcmd.

Vehicle Spawner
Made by myself, it's a bigger script, so you can view it here:
https://sampforum.blast.hk/showthread.php?pid=879008#pid879008

Vehicles from grand larcency to AddStaticVehicleEx
See this topic: https://sampforum.blast.hk/showthread.php?tid=253202

NOTE: I'll add more later.it.

- Kevin
Reply


Messages In This Thread
F.A.S. : Frequently Asked Scripts - by Kwarde - 20.03.2011, 15:14
Re: F.A.S. : Frequently Asked Scripts - by [ProX]BlueFire - 20.03.2011, 15:15
Re: F.A.S. : Frequently Asked Scripts - by Crime Life - 20.03.2011, 15:15
Re: F.A.S. : Frequently Asked Scripts - by [ProX]BlueFire - 20.03.2011, 15:36
Re: F.A.S. : Frequently Asked Scripts - by Medal Of Honor team - 20.03.2011, 15:52
Re: F.A.S. : Frequently Asked Scripts - by [ProX]BlueFire - 20.03.2011, 16:07
Re: F.A.S. : Frequently Asked Scripts - by justsomeguy - 20.03.2011, 18:33
Re: F.A.S. : Frequently Asked Scripts - by mmrk - 20.03.2011, 18:53
Re: F.A.S. : Frequently Asked Scripts - by Hal - 20.03.2011, 23:39
Re: F.A.S. : Frequently Asked Scripts - by airsoft - 21.03.2011, 01:56
Re: F.A.S. : Frequently Asked Scripts - by Ironboy - 21.03.2011, 05:22
Re: F.A.S. : Frequently Asked Scripts - by Lorenc_ - 21.03.2011, 07:57
Re: F.A.S. : Frequently Asked Scripts - by Kwarde - 21.03.2011, 11:11
Re: F.A.S. : Frequently Asked Scripts - by Michael@Belgium - 21.03.2011, 20:39
AW: F.A.S. : Frequently Asked Scripts - by Pablo Borsellino - 21.03.2011, 20:50
Re: AW: F.A.S. : Frequently Asked Scripts - by Hal - 22.03.2011, 01:09
Re: F.A.S. : Frequently Asked Scripts - by killanator10 - 26.03.2011, 02:32
Re: F.A.S. : Frequently Asked Scripts - by Kwarde - 26.03.2011, 09:22
Re: F.A.S. : Frequently Asked Scripts - by Kwarde - 09.04.2011, 07:08
Re: F.A.S. : Frequently Asked Scripts - by iJumbo - 09.04.2011, 09:24
Re: F.A.S. : Frequently Asked Scripts - by Kwarde - 09.04.2011, 09:40
Re: F.A.S. : Frequently Asked Scripts - by HyperZ - 09.04.2011, 10:28
Re: F.A.S. : Frequently Asked Scripts - by Kwarde - 09.04.2011, 11:02
Re: F.A.S. : Frequently Asked Scripts - by Michael@Belgium - 09.04.2011, 19:28
Re: F.A.S. : Frequently Asked Scripts - by GangsTa_ - 10.04.2011, 11:17
Re: F.A.S. : Frequently Asked Scripts - by Kwarde - 10.04.2011, 11:50
Re: F.A.S. : Frequently Asked Scripts - by alpha500delta - 11.04.2011, 18:45
Re: F.A.S. : Frequently Asked Scripts - by Kwarde - 11.04.2011, 18:56
Re: F.A.S. : Frequently Asked Scripts - by justsomeguy - 13.04.2011, 13:42
Re: F.A.S. : Frequently Asked Scripts - by Kwarde - 05.05.2011, 12:51

Forum Jump:


Users browsing this thread: 1 Guest(s)