SA-MP Forums Archive
[FilterScript] F.A.S. : Frequently Asked Scripts - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] F.A.S. : Frequently Asked Scripts (/showthread.php?tid=242732)

Pages: 1 2


F.A.S. : Frequently Asked Scripts - Kwarde - 20.03.2011

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


Re: F.A.S. : Frequently Asked Scripts - [ProX]BlueFire - 20.03.2011

nice....


Re: F.A.S. : Frequently Asked Scripts - Crime Life - 20.03.2011

very nice work. Make a /gang [chat]


Re: F.A.S. : Frequently Asked Scripts - [ProX]BlueFire - 20.03.2011

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


Re: F.A.S. : Frequently Asked Scripts - Medal Of Honor team - 20.03.2011

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


Re: F.A.S. : Frequently Asked Scripts - [ProX]BlueFire - 20.03.2011

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


Re: F.A.S. : Frequently Asked Scripts - justsomeguy - 20.03.2011

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!


Re: F.A.S. : Frequently Asked Scripts - mmrk - 20.03.2011

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;
}



Re: F.A.S. : Frequently Asked Scripts - Hal - 20.03.2011

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.


Re: F.A.S. : Frequently Asked Scripts - airsoft - 21.03.2011

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



Re: F.A.S. : Frequently Asked Scripts - Ironboy - 21.03.2011

Nice


Re: F.A.S. : Frequently Asked Scripts - Lorenc_ - 21.03.2011

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...


Re: F.A.S. : Frequently Asked Scripts - Kwarde - 21.03.2011

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


Re: F.A.S. : Frequently Asked Scripts - Michael@Belgium - 21.03.2011

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


AW: F.A.S. : Frequently Asked Scripts - Pablo Borsellino - 21.03.2011

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


Re: AW: F.A.S. : Frequently Asked Scripts - Hal - 22.03.2011

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


Re: F.A.S. : Frequently Asked Scripts - killanator10 - 26.03.2011

i like the /do command i think i will use that thx


Re: F.A.S. : Frequently Asked Scripts - Kwarde - 26.03.2011

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


Re: F.A.S. : Frequently Asked Scripts - Kwarde - 09.04.2011

UPDATE: Mistake fixed in the /mute command.


Re: F.A.S. : Frequently Asked Scripts - iJumbo - 09.04.2011

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