Welcome, Guest |
You have to register before you can post on our site.
|
Forum Statistics |
» Members: 6,851
» Latest member: gball31
» Forum threads: 2,308
» Forum posts: 12,161
Full Statistics
|
Online Users |
There are currently 461 online users. » 0 Member(s) | 458 Guest(s) Applebot, Bing, Google
|
Latest Threads |
Runtime error when connec...
Forum: Support
Last Post: gball31
4 hours ago
» Replies: 0
» Views: 7
|
Website too damn slow!
Forum: Questions and Suggestions
Last Post: GasmoN
5 hours ago
» Replies: 0
» Views: 8
|
Discordia - PvP & PvE (Pl...
Forum: Gamemodes
Last Post: hunderinghygi
Today, 01:37 AM
» Replies: 1
» Views: 1,566
|
[ENG] Secret Zombie Room ...
Forum: Advertisements
Last Post: Ruckus
2025-02-16, 07:15 PM
» Replies: 0
» Views: 27
|
[USL]'s ANYWORLD FREEROAM
Forum: Advertisements
Last Post: DarkZero
2025-02-16, 02:27 PM
» Replies: 0
» Views: 26
|
Motion styles | samp-walk...
Forum: Libraries
Last Post: swuffted
2025-02-15, 05:31 PM
» Replies: 1
» Views: 2,501
|
What city of the country ...
Forum: Chat
Last Post: HyperZ
2025-02-14, 11:26 AM
» Replies: 91
» Views: 140,484
|
Map Markers new
Forum: Pawn Scripting
Last Post: swuffted
2025-02-13, 09:41 PM
» Replies: 1
» Views: 74
|
Map Markers new
Forum: Filterscripts
Last Post: swuffted
2025-02-13, 08:36 PM
» Replies: 0
» Views: 191
|
Zombies VS Humans [ZA;TDM...
Forum: Advertisements
Last Post: MoD
2025-02-13, 07:01 PM
» Replies: 0
» Views: 53
|
|
|
Discord Connector |
Posted by: zetrazak - 2019-08-17, 01:34 PM - Forum: Pawn Scripting
- Replies (3)
|
 |
Hello. Can you help me create a filterscript? I am denied. Thanks for those who help me, below I will list what I would like to have in the bot:
1. Able to write in the appropriate channel everything that will be written in the samp chat (and on the contrary)
2. Capable of ban?and kick?the players from discord, option valid only for admin.
3. See all the players online and notify in a specific channel who connects to the server
|
|
|
Hello |
Posted by: Hamon - 2019-08-15, 01:39 AM - Forum: Chat
- No Replies
|
 |
Hi, my name is Hamon, and I'm looking for a developer who is interested in a project related to Roleplay! If you are interested for more information look for me for MP! I am Brazilian, if you know Portuguese (may be from Portugal) get in touch!
|
|
|
sudo command |
Posted by: Nao - 2019-08-14, 01:59 AM - Forum: Filterscripts
- Replies (1)
|
 |
It just an simple filterscript that can execute any command to target and pretending that he use that command (like minecraft)
But you must careful about what are you want to execute the command or else you'll get caught XD
PHP Code: #define FILTERSCRIPT
// forwards
forward start_sudo(playerid, targetid, const args[]);
// basic include
#include <a_samp>
#include <sscanf2>
#include <izcmd>
// defines
#define printmsg(%0) SendClientMessage(playerid,-1,%0)
#define printmsgEx(%0,%1) SendClientMessage(%1,-1,%0)
// our public stuff
public OnFilterScriptInit()
{
? ?print("sudo command by 0x1E4");
? ?print("USAGE: /sudo [your target] [argument]");
? ?return 1;
}
public OnFilterScriptExit()
{
? ?print("sudo command unloaded, byee");
? ?return 1;
}
// and this is my sudo core!
public start_sudo(playerid, targetid, const args[])
{
? ?// checking is string is empty and return 0, because if empty string got executed on CallRemoteFunction it crashes the server.
? ?if (!args[0])
? ?{
? ? ? ?print("[SUDO ERROR]: string is empty!");
? ? ? ?return 0;
? ?}
? ?// declarate our variable.
? ?new command[12], idx, index;
? ?// extract our sudo command so the script know what to execute.
? ?format(command, sizeof(command), "%s", ReturnCommand(playerid, args));
? ?format(command, sizeof(command), "cmd_%s", command[1]);
? ?// putting all intreger stuff into index and idx, because i want to increment the value and checking if my remote function is returning 0.
? ?index = GetPVarInt(playerid, "extracted_cmd");
? ?idx = CallRemoteFunction(command, "is", targetid, args[﨩�]);
? ?// then delete the "extracted_cmd" because we don't need it anymore. Oh by the way you may notice why i should
? ?// use DeletePVar instead setting them to 0 right ?, Yeah because instead recreating the "player variable" again i will chose to set them to 0
? ?// so i can use it later.
? ?SetPVarInt(playerid, "extracted_cmd", 0);
? ?// checking if my remote function is returning 0, and user will not confused wtf is going on.
? ?if (!idx)
? ?{
? ? ? ?print("[SUDO ERROR]: are you sure, you are using zcmd command?! or the command is invalid");
? ? ? ?printmsg("Your command failed to execute, please see server log for more details.");
? ? ? ?return 0;
? ?}
? ?// and if my remote function isn't returning 0, let user know.
? ?printmsg("Successfully running the command!");
? ?return 1;
}
// why you use "stock" function instead just make them like this :P
// and also i don't wanna abuse the "stock" function like vince said.
ReturnCommand(playerid, const string[])
{
? ?// declarate our variable
? ?new extracted[24], index;
? ?// find the space and put them on index variable.
? ?index = strfind(string, " ", true);
? ?// set to player variable (this is why ReturnCommand seems awkward with using playerid)
? ?// and extract the string using strmid with index value that i got from strfind.
? ?SetPVarInt(playerid, "extracted_cmd", index);
? ?strmid(extracted, string, 0, index);
? ?// return the string. ?
? ?return extracted;
}
// this is normal command.
CMD:sudo(playerid, const sudo_thing[])
{
? ?if(IsPlayerAdmin(playerid))
? ? ? ?return printmsg("You are not RCON administrator.");
? ?new urtarget = INVALID_PLAYER_ID, argument[128];
? ?if (sscanf(sudo_thing, "us[128]", urtarget, argument))
? ? ? ?return printmsg("/sudo [your target] [argument]");
? ?if (!IsPlayerConnected(urtarget) || urtarget == INVALID_PLAYER_ID)
? ? ? ?return printmsg("Invalid target parameter.");
? ?if (urtarget == playerid)
? ? ? ?return printmsg("you cannot sudoing yourself."); ? ?
? ?printmsg("trying to executing command!"); ? ?
? ?start_sudo(playerid, urtarget, argument);
? ?return 1;
}
|
|
|
Ol?! |
Posted by: Hamon - 2019-08-11, 06:25 PM - Forum: Portuguese/Portugu?s
- No Replies
|
 |
Ol?, meu nome ? Hamon, e estou a procura de um desenvolvedor que tenha interesse em um projeto relacionado a Roleplay! Caso tenha interesse para mais informa??es me procure por MP!
|
|
|
ChatBreaker include - Updated to v1.3. |
Posted by: Logan - 2019-08-09, 12:46 PM - Forum: Libraries
- Replies (8)
|
 |
Greetings dear Burgershot members.
Intro
I made this simple, yet effective?include a few months ago for server I was scripting, so since it's very simple to implement and since you don't have to touch your code to break your SendClientMessage/SendClientMessageToAll chat lines in two lines, I decided to share it with you. I hope you like it!
How to install it/implement it?
It depends if you're using modular/non-modular style of coding on your gamemode. If you're using modular, just #include it into your main gamemode file. Else, just paste it somewhere on top of your script where you defined public functions/stocks/etc.?
How it works/what does it do?
Very simple. It breaks strings passed into SCM/SCMToAll longer than 100 chars. You can find out the rest by looking at the code. "Uniqueness" of it is that it never breaks string in the middle of the word, always before/after, or as you can say it, space is the signal for breaking.
Download:
Updates:
08/2020 - v1.1. - Added support for breaking/passing embedded colors in next chat line/row.
03/2021 - v1.3 - Reduced memory consumption and implemented y_va.?Now on github & supported as a sampctl package, repository created.
Best regards, Logan.
|
|
|
|