[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
#2

nice....
Reply
#3

very nice work. Make a /gang [chat]
Reply
#4

make /gang create/invite/kick/setleader/setcar/leave/destroy/sethq/setlvl/call/find/setcolor/members/gangs/setcarcolor/save/setname/setgangtag/info/chat
Reply
#5

Quote:
Originally Posted by [ProX]BlueFire
Посмотреть сообщение
make /gang create/invite/kick/setleader/setcar/leave/destroy/sethq/setlvl/call/find/setcolor/members/gangs/setcarcolor/save/setname/setgangtag/info/chat
make this also saves
Reply
#6

lol i already saied this xD
(its after "savecolor" and before "setname")
Reply
#7

thanks dude!

could you also make an /do command? that will work like this:
Код:
/do [action example: /do knocks him out do i succes?]
and it will look like this:
(knocks him out do i succes?(justsomeguy))
thanks anyway!
Reply
#8

Maybe?
pawn Код:
CMD:me(playerid, params[])
{
    new pName[MAX_PLAYER_NAME], str[128];
    if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /me [action]");
    GetPlayerName(playerid, pName, sizeof(pName));
    format(str, sizeof(str), "%s %s", pName, params);
    SendClientMessageToAll(COLOR_YELLOW, str);
    return 1;
}
Reply
#9

Quote:
Originally Posted by [ProX]BlueFire
Посмотреть сообщение
make /gang create/invite/kick/setleader/setcar/leave/destroy/sethq/setlvl/call/find/setcolor/members/gangs/setcarcolor/save/setname/setgangtag/info/chat
he is making simple stand-alone commands. Not whole systems. Search for : Admin system, gang system, etc.
Reply
#10

Lol Some of you guys are so needy...
Quote:
Originally Posted by [ProX]BlueFire
Посмотреть сообщение
make /gang create/invite/kick/setleader/setcar/leave/destroy/sethq/setlvl/call/find/setcolor/members/gangs/setcarcolor/save/setname/setgangtag/info/chat
Reply
#11

Nice
Reply
#12

Quote:
Originally Posted by [ProX]BlueFire
Посмотреть сообщение
make /gang create/invite/kick/setleader/setcar/leave/destroy/sethq/setlvl/call/find/setcolor/members/gangs/setcarcolor/save/setname/setgangtag/info/chat
Your going to advanced there, there are gamemodes such as LVA for that stuff...
Reply
#13

Whatever, I'm now making a fast and easy gang system (must be downloaded because of scriptfiles and a plugin).
Reply
#14

(y) nice fs (but i don't need it xD)
Reply
#15

Nice, but please use something like a Distance Detector, that checks how far away are nother players from the /me-CMD User, not everyone want that the Message goes to all Users from Los Santos to Bayside
Reply
#16

Quote:
Originally Posted by Pablo Borsellino
Посмотреть сообщение
Nice, but please use something like a Distance Detector, that checks how far away are nother players from the /me-CMD User, not everyone want that the Message goes to all Users from Los Santos to Bayside
He said it was global /me , and that it was not for RP servers. Maybe read just a tad closer :P
Reply
#17

i like the /do command i think i will use that thx
Reply
#18

Gang System added - By Cameltoe [ https://sampforum.blast.hk/showthread.php?tid=243214 ]
Reply
#19

UPDATE: Mistake fixed in the /mute command.
Reply
#20

hm

pawn Код:
CMD:announce(playerid,params[])
{
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "ERROR: You are not a RCON admin!");
    if(!strlen(params)) return SendClientMessage(playerid,COLOR_RED,"/ANNOUNCE [TEXT]");
    GameTextForAll(params,5000,4);
    return 1;
}

CMD:clearchat(playerid,params[])
{
    #pragma unused params
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_RED, "ERROR: You are not a RCON admin!");
    new string[128];
    for(new b = 0; b < 13; b++)
    {
        SendClientMessageToAll(COLOR_RED," ");
    }
    return 1;
}
untested
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)