Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - PSL

#1
PassDataToServer

I can use the this function to send this table, but using this function in script uninstallation events is invalid。

What I can think of now is to use a client timer to implement it
#2
The player's client has a table that stores the state of the GUI. I hope that when the player quits, this table can be sent to the server and stored on the server, so that when the player logs in again, the table can be transmitted to restore the previous GUI state.
#3
Hi Habi,How to send the last data to the server using client-side scripts when a player quits, such as after entering /q?

I tried to perform a remote call to return data during the player exit event, but there was no response
#4
Community Plugins / Re: New Python Plugin
May 12, 2025, 05:08 AM
Well done! This plugin supports functional expansion, bringing a great deal of possibilities to VC-MP servers. I'm looking forward to seeing more developers creating interesting gameplay based on it!
#5
After my testing, this problem has been solved
#6
Hello, Hibi.
An error occurred with GetRemoteValue("print")("abc") on the client, typeof( GetRemoteValue("print")("abc") ) This returns type null.
When I use Exec(GetRemoteValue("print")("Have a nice day")) the client throws an error PeerExec: superblob expected but got null

    local userData = CallRemoteFunc( GetRemoteValue("print"),"123");
    Exec( userData );  //This is effective
#7
Hi, Habi.
I have been using the NPC plug-in you developed. The appearance of NPC has enriched the gameplay of the game. I would like to express my heartfelt thanks to you. After a period of use, I found that if you can add some specific functions to the plug-in, it may further improve its functionality and practicality. I would like to add some functions related to getting properties. I made a feature that fits my needs. Although I have already built it, I still want to integrate it into the plugin.
function OnPlayerStreamIn(playerid)
{
    print("npctest: OnPlayerStreamIn(playerid="+playerid+")\n");

//When you find a player, save player attributes first
getPlayerImmunity(playerid);
}

function OnPlayerStreamOut(playerid)
{
    print("npctest: OnPlayerStreamOut(playerid="+playerid+")\n");

//Here I have written a function that empties the player's attributes
}

function onGetImmunity(playerID, immunity){
print(GetPlayerName(playerID)+"'s Immunity: "+immunity+" \n");

//I store the data in a table and use the following function to get it when needed
}

function getPlayerImmunity(playerID){
//Get the player attributes I want from the table
}

function toGetPlayerImmunity(playerID){
RFC("getPlayerImmunity")(playerID, GetMyID());
}

//server
function getPlayerImmunity(playerID, npcID){
local plr = FindPlayer(playerID);
if(plr){
RFC(npcID, "onGetImmunity")(plr.ID, plr.Immunity);
}
}

Now you can use getPlayerImmunity to get the player's immunity in NPC scrpit. I've done a lot of things with this approach, such as player transparency, player cash, player deposits, whether a player can be attacked, player IP, UID, etc, Your varholder plugin has also helped me a lot.

I understand that adding these functions may increase your workload, but I believe that these new functions will not only meet my personal needs, but may also benefit more users, thus further increasing the value and popularity of the plug-in.
If you are willing to consider my request, I would be more than happy to provide you with more information about the specific details and usage scenarios of these functions to help you better understand my requirements. If there is anything I can do to help during the development process, such as testing new features, please feel free to ask and I will assist in any way I can.
Thank you again for developing such an excellent plugin and look forward to hearing from you.
#8
I can't wait to use it. Well done, Habi bro!
#9
Thank you. The code you provided worked
#10
Hi Habi.
This plugin works well, I've been using it, I'm having some problems right now.
shop <- null;

class Shop {
a = null;
b = null;
constructor(a,b){
}
}

The client has a slot A and a Shop class
I want to implement a = Shop(a,b); But it failed.

My code:
local userData = ::SetRemoteValue( ::GetRemoteValue("shop"), ::CallRemoteFunc( ::GetRemoteValue("Shop"), name, cargo ) );
 ::RemoteExec(userData, player);
#11
Oh no, I used the plugin from 2015, I switched to 2018 now, the problem is fixed
#12
Thank you. That problem has been solved, but a new problem has arisen

Loaded plugin: announce04rel64

Plugin error >> 'plugins/mysql04rel64.so' plugin is for incompatible API version 0.0 (current is 2.0).
Loaded plugin: mysql04rel64

Plugin error >> 'plugins/sockets04rel64.so' plugin is for incompatible API version 0.0 (current is 2.0).
Loaded plugin: sockets04rel64

Loaded plugin: squirrel04rel64
#13
.so: cannot open shared object file: No such file or directory
Failed to load plugin: squirrel04rel64


.
├── announce.log
├── plugins
│   ├── announce04rel64.so
│   ├── mysql04rel64.so
│   ├── sockets04rel64.so
│   └── squirrel04rel64.so
├── scripts
│   └── main.nut
├── server64
├── server.cfg
└── server_log.txt

gamemode Default
plugins announce04rel64 squirrel04rel64
port 8192
sqgamemode scripts/main.nut

What kind of question is that
#14
General Discussion / Re: Radio for Player
Nov 27, 2024, 08:55 AM
I used to turn a 50-plus second piece of audio into an mp3, then add it to a custom resource and play it with the sound ID, or longer
#15
General Discussion / Re: doubt checkpoints
Nov 27, 2024, 07:27 AM
This is a function that I made to create buildings and undo buildings, and redo buildings, and I created two lists to store created buildings and deleted buildings for recovery by command, and I think this is very similar to distance judgment, so you can add a timer, and when there is no one around 200 meters around the checkpoint, delete it and record, When there are people around 200 meters, recover through the list.