Welcome, Guest |
You have to register before you can post on our site.
|
Online Users |
There are currently 522 online users. » 1 Member(s) | 518 Guest(s) Bing, Google, Yandex, minorusora
|
Latest Threads |
Command does not work in-...
Forum: Pawn Scripting
Last Post: PANZEHIR_
2024-11-23, 06:36 PM
» Replies: 0
» Views: 41
|
White Screen
Forum: Support
Last Post: Phat202146_real
2024-11-21, 02:50 PM
» Replies: 0
» Views: 39
|
I get error 021 using y_h...
Forum: Pawn Scripting
Last Post: daniscript18
2024-11-18, 11:34 PM
» Replies: 0
» Views: 60
|
Il reste des français sur...
Forum: French/Fran?ais
Last Post: tysanio
2024-11-18, 05:39 AM
» Replies: 2
» Views: 466
|
Object creation issues
Forum: Programming
Last Post: K1271
2024-11-15, 11:51 PM
» Replies: 0
» Views: 56
|
Is the SAMP Hosting the s...
Forum: General Discussions
Last Post: OperaGX
2024-11-14, 09:33 PM
» Replies: 0
» Views: 74
|
Run time error 19: "File ...
Forum: Pawn Scripting
Last Post: Rexey
2024-11-14, 03:50 AM
» Replies: 0
» Views: 64
|
How to Compile Your Gamem...
Forum: Tutorials
Last Post: thelante
2024-11-13, 08:50 AM
» Replies: 3
» Views: 468
|
Modeller wanted
Forum: Development Updates
Last Post: acc.gangbeni
2024-11-11, 05:10 PM
» Replies: 9
» Views: 16,504
|
SA:MP forum offline
Forum: Portuguese/Portugu?s
Last Post: weslley_script
2024-11-09, 05:27 PM
» Replies: 7
» Views: 9,931
|
|
|
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.
|
|
|
Function "Player Collisions" |
Posted by: PANZEHIR - 2019-08-05, 11:44 PM - Forum: Questions and Suggestions
- Replies (2)
|
|
Hello,
I dont know if this was suggested, did not find any thread, so im going to suggest it. How about add special function called "Player Collisions"? this is like the "Vehicle Collisions" which got added in 2015. With the "Player Collisions" function you will not be stuck at stairs/doors while playing certain minigames, also you will be able to walk?through players... but shoots from weapons will take damage still.
|
|
|
Adjusted skins list for open.mp |
Posted by: Caledonite - 2019-08-05, 05:30 PM - Forum: Questions and Suggestions
- Replies (1)
|
|
Hi!
I thought it was a little bit absurd that SA-MP doesn't contain some skins that are present in the gta3.img files and?most of "special" skins have only one and same movement?animation, so I thought if it was customized a little bit, then it might be better opinion as well.
I went ahead and made a list of those skins, which seems to be more reliable and better use for everyone. It is totally up to the developers of open.mp, if they wish to stick to SA-MP's own skin list or take inspiration (or rather use this) from the custom one.
https://pastebin.com/U3tw80Q6
|
|
|
invalid connection handle |
Posted by: IdontMIss - 2019-08-04, 06:58 PM - Forum: Pawn Scripting
- Replies (2)
|
|
I started scripting a fresh new TDM script from 0 and I wanted to try out the bcyrpt hashing alg and everything went fine I created a register/login system but when I wanted to test it next things happend:
myScript:
Code: public OnPlayerConnect(playerid) {
?? ?new query[256];
?? ?mysql_format(SQL, query, sizeof query, "SELECT * FROM `players` WHERE `name`='%e' LIMIT 1", GetPlayerNameEx(playerid)); // 9
??? mysql_pquery(SQL, query, "OnAccountCheck", "i", playerid); // 10
??? #if defined reg_OnPlayerConnect
??????? return reg_OnPlayerConnect(playerid);
??? #else
??????? return true;
??? #endif
}
#if defined _ALS_OnPlayerConnect
??? #undef OnPlayerConnect
#else
??? #define _ALS_OnPlayerConnect
#endif
#define OnPlayerConnect reg_OnPlayerConnect
#if defined reg_OnPlayerConnect
??? forward reg_OnPlayerConnect(playerid);
#endif
The errors I get in mysql
Code: [INFO] changed log level from 'warning, error' to 'debug, info, warning, error'
[DEBUG] CThreadedConnection::WorkerFunc(this=0x41ea020, connection=0x41ea020)
[DEBUG] mysql_format(111, 0x0307AF98, 256, "SELECT * FROM `players` WHERE `name` = '%e'") (modules/register.pwn:10)
[ERROR] mysql_format: invalid connection handle '111' (modules/register.pwn:10)
[DEBUG] mysql_pquery(111, "", "OnAccountCheck", "i") (modules/register.pwn:11)
[ERROR] mysql_pquery: invalid connection handle '111' (modules/register.pwn:11)
[DEBUG] mysql_pquery: return value: '0' (modules/register.pwn:11)
EDIT: I use R41-4 and this happens after OnGameModeInit, and my connection is successful
|
|
|
argument type mismatch (argument 4) |
Posted by: Polygon - 2019-08-04, 05:42 PM - Forum: Support
- Replies (2)
|
|
So I'm using the community complier stdlib easyDialog, but for some reason I got an error at line 95...
Code: ShowPlayerDialog(playerid, 32700, style, caption, string, button1, button2);
...in easyDialog.inc (argument type mismatch (argument 4)). easyDialog is const corrected, and stdlib aswell, what could be the problem? I tried with older version of the complier, also other version of stdlib but it just doesn't work.
|
|
|
|