[Plugin] YSF - kurta999's version

It's possible to add also ApplyAnimationForPlayer?
Reply

Before I'm going to sleep, I checked it in IDA. Looks like, yes.
Reply

Quote:
Originally Posted by Y_Less
Посмотреть сообщение
One problem - that's not what "-1" actually does. There is a better fix on the forums somewhere that correctly uses carcols.dat data.
Yes, I know, but it was an acceptable solution, temporary, instead of applying all that code. It would be nice if it would be integrated in the plugin.

The fix Y_Less is talking about, made by Emmet:
https://sampforum.blast.hk/showthread.php?tid=500622
Reply

Is it possible to add something like this to YSF?:
Код:
RedirectPlayerToServer(playerid, serverip[], port); // Redirects a player to another server
ReconnectPlayer(playerid); // forces a player to reconnect
That would be great.
Reply

Quote:
Originally Posted by Peek
Посмотреть сообщение
Is it possible to add something like this to YSF?:
Код:
RedirectPlayerToServer(playerid, serverip[], port); // Redirects a player to another server
ReconnectPlayer(playerid); // forces a player to reconnect
That would be great.
Impossible.
Reply

Quote:
Originally Posted by kurta999
Посмотреть сообщение
Impossible.
Regarding the reconnect that is possible without plug-ins by banning their IP(without kicking).

Example:
pawn Код:
new playerIP[MAX_PLAYERS][32];
new bool: Relogging[MAX_PLAYERS];
CMD:relog(playerid, params[])
{
     new string[64];
     GetPlayerIp(playerid, playerIP[playerid], sizeof(playerIP[playerid]));
     format(string, sizeof(string), "banip %s", playerIP[playerid]));
     SendRconCommand(string);
     Relogging[playerid] = true;
     return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    if(Relogging[playerid] == true)
    {
            format(string, sizeof(string), "unbanip %s", playerIP));
            SendRconCommand(string);
            Relogging[playerid] = false;
            return 1;
    }
    return 1;
}
Sorry for my shitting scripting, its quite late here.
Reply

Код:
native IsPlayerSpawned(playerid);
doesn't work for me always. It sometimes says that the player is already spawned even if he isn't.
And a small question. Is it somehow possible that a vehicle doesn't accelerate if the player presses the acceleration key without turning off the engine ? Because if you turn off the engine in an aircraft it will fall down to the ground like a stone.

I've also got two small suggestions. I know they are also possible to make with pawn but it would still be cool
Код:
native ToggleVehicleControlable(vehicleid, bool:toggle);
native GetVehicleRot(vehicleid);
Reply

Quote:
Originally Posted by Oskaar1994
Посмотреть сообщение
Код:
native ToggleVehicleControlable(vehicleid, bool:toggle);
You can do it using PAWN.
pawn Код:
new bool:VehControl[MAX_VEHICLES];
public OnGameModeInit() ManualVehicleEngineAndLights();
stock ToggleVehicleControlable(vehicleid, bool:toggle) VehControl[vehicleid] = toggle;
And then every time check this boolean before SetVehicleParamsEx.
Reply

Quote:
Originally Posted by Abagail
Посмотреть сообщение
Regarding the reconnect that is possible without plug-ins by banning their IP(without kicking).

Example:
pawn Код:
new playerIP[MAX_PLAYERS][32];
new bool: Relogging[MAX_PLAYERS];
CMD:relog(playerid, params[])
{
     new string[64];
     GetPlayerIp(playerid, playerIP[playerid], sizeof(playerIP[playerid]));
     format(string, sizeof(string), "banip %s", playerIP[playerid]));
     SendRconCommand(string);
     Relogging[playerid] = true;
     return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    if(Relogging[playerid] == true)
    {
            format(string, sizeof(string), "unbanip %s", playerIP));
            SendRconCommand(string);
            Relogging[playerid] = false;
            return 1;
    }
    return 1;
}
Sorry for my shitting scripting, its quite late here.
Maybe I will implement this.
Reply

I really wish this was SA-MP 0.4...
Reply

Quote:
Originally Posted by Kar
Посмотреть сообщение
I really wish this was SA-MP 0.4...
I don't! If this was a SA-MP update then the plug-in wouldn't be open-source. Having this as an open-source plugin allows for scripting learning & development(even for experienced PAWN scripters who don't actually know how SA:MP physically works).

Hence: I would hate for this to be a SA:MP update, and not a plug-in.
Reply

Quote:
Originally Posted by Abagail
Посмотреть сообщение
I don't! If this was a SA-MP update then the plug-in wouldn't be open-source. Having this as an open-source plugin allows for scripting learning & development(even for experienced PAWN scripters who don't actually know how SA:MP physically works).

Hence: I would hate for this to be a SA:MP update, and not a plug-in.
Some functions such as CreateExplosionForPlayer etc were in YSF and got themselves a place on the SA-MP updates. But I don't think it would be fully implemented.
Reply

Doesn't work:

pawn Код:
CMD:gravity(playerid, params[])
{
    SetPlayerGravity(playerid, floatstr(params));
}
Works:

pawn Код:
CMD:gravity(playerid, params[])
{
    SendRPC(playerid, 0x92, BS_FLOAT, floatstr(params));
}
Is SetPlayerGravity working for anyone else or is it just me? - Even in the example script without recompiling, it doesn't work.
Reply

Quote:
Originally Posted by Whitetiger
Посмотреть сообщение
Doesn't work:

pawn Код:
CMD:gravity(playerid, params[])
{
    SetPlayerGravity(playerid, floatstr(params));
}
Works:

pawn Код:
CMD:gravity(playerid, params[])
{
    SendRPC(playerid, 0x92, BS_FLOAT, floatstr(params));
}
Is SetPlayerGravity working for anyone else or is it just me? - Even in the example script without recompiling, it doesn't work.
For me works. Anyway, now hooking only will works in gamemode, please inclued YSF.inc to your GM and recompile. This will be fixed in R11 because I switched to SAMP GDK.
Reply

Now that things like SetPlayerSkinForPlayer, SetPlayerNameForPlayer, SetPlayerFightingStyleForPlayer were added, isn't something like MoveObjectForPlayer possible ? For that player the global object moves, but for the rests, it stays in place. I know that there are player objects, but this would be more efficient.
Reply

I guess AttachPlayerObjectToPlayerObject could be done as well?
Reply

Quote:
Originally Posted by Gamer_Z
Посмотреть сообщение
Please elaborate your logic about efficiency? You'd need to save the object state for each player anyway. So you're just exactly doing PlayerObjects.
I was sure that not many will get my idea. For example, I was looking at a GTA V video and he was buying weapons at an ammunation, and when he was buying, he saw the objects (weapons) placed on the wall, and when he selected one, it would move in front of other weapons, like it is floating above, to see that it is selected. Instead of creating about 19 player objects for every player, we could simply create 19 global objects, and moving them separately for everyone. This is just an example. I don't know how hard it is to make, but if it's basically recreating player objects, then it's unnecessary (I don't think it's that hard).
Reply

Quote:
Originally Posted by IstuntmanI
Посмотреть сообщение
I was sure that not many will get my idea. For example, I was looking at a GTA V video and he was buying weapons at an ammunation, and when he was buying, he saw the objects (weapons) placed on the wall, and when he selected one, it would move in front of other weapons, like it is floating above, to see that it is selected. Instead of creating about 19 player objects for every player, we could simply create 19 global objects, and moving them separately for everyone. This is just an example. I don't know how hard it is to make, but if it's basically recreating player objects, then it's unnecessary (I don't think it's that hard).
This is actually a pretty good idea.

But you can still overcome this. You can create these objects and delete them when you're done with them.

But yes, the idea is good.
Reply

Support for 1000p is necessary to the version, please
Reply

Quote:
Originally Posted by Gamer_Z
Посмотреть сообщение
But.. you will still need to save the state/position of all those 19 objects for each player? How else can you tell if a objects is floating for a player or not.
Saving the ID of the object in a variable for each player (not 19 for each player, but only one), and when he cancels or something like that, that object will be moved back for him and variable will reset. It was just an example, there's no need for that much details. If it is easy to be made, I don't see why not, especially that it can be useful.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)