[Plugin] YSF - kurta999's version

Quote:
Originally Posted by LorDWarS
View Post
but, how can I bulid it?
Ask in SA-MP+ thread.
Reply

Quote:
Originally Posted by QuaTTrO
View Post
Ask in SA-MP+ thread.
I asked where .. they told me to install something, but I did not understand what I said this is related ..

There is a situation you build me the function? - TogglePlayerDriveOnWater
Reply

Quote:
Originally Posted by LorDWarS
View Post
I asked where .. they told me to install something, but I did not understand what I said this is related ..

There is a situation you build me the function? - TogglePlayerDriveOnWater
No. Because i don't have idea how to do it.

Kurta999, is this function possible?:
pawn Code:
native SetPlayerInteriorForPlayer(playerid, forplayerid, interior);
Reply

add full keyboard detection:

pawn Code:
public OnPlayerPressKey(playerid, key); // key = 'a' / 'b' / 'c', etc - only 1 key per call back
public OnPlayerReleaseKey(playerid, key); // key = 'a' / 'b' / 'c', etc - only 1 key per call back
Reply

Please, stop spamming about keyboard detection in every plugin thread.
It's not going to happen.
Reply

Quote:
Originally Posted by QuaTTrO
View Post
No. Because i don't have idea how to do it.

Kurta999, is this function possible?:
pawn Code:
native SetPlayerInteriorForPlayer(playerid, forplayerid, interior);
Impossible. But you can hide/show player for player with ShowPlayerForPlayer/HidePlayerForPlayer.
Reply

Quote:
Originally Posted by LorDWarS
View Post
And how do I change it on the client side? I did not realize that what needs to change?
It requires a mod that will be needed to downloaded by player. That why SA-MP+ can have this feature.
Reply

Quote:
Originally Posted by QuaTTrO
View Post
How about:
pawn Code:
native SendClientMessagef(playerid, color, msg[], {Float,_}:...);
native SendClientMessageToAllf(color, msg[], {Float,_}:...);
I know that can be done in PAWN but plugin implementation might be faster.
I don't think there would be a huge speed difference between using a plugin, or PAWN for it. I use y_va, which does that job (SendClientMessage with formatted parameters).
Reply

Quote:
Originally Posted by QuaTTrO
View Post
It requires a mod that will be needed to downloaded by player. That why SA-MP+ can have this feature.
but i dont success to install is in my server! and they dont help me!
Reply

Quote:
Originally Posted by QuaTTrO
View Post
How about:
pawn Code:
native SendClientMessagef(playerid, color, msg[], {Float,_}:...);
native SendClientMessageToAllf(color, msg[], {Float,_}:...);
I know that can be done in PAWN but plugin implementation might be faster.
Code:
#define SendClientMessagef(%0,%1,%2) (format(msg_Messger,sizeof(msg_Messger),%2),SendClientMessage(%0,%1,msg_Messger))
Explame:
Code:
SendClientMessagef(playerid, 0xffcc12, "Hello World!");
SendClientMessagef(playerid, 0xff12cc, "Hello %s!", "World");
Look is also an http://pastebin.com/n21QZdbN
Reply

Quote:
Originally Posted by QuaTTrO
View Post
How about:
pawn Code:
native SendClientMessagef(playerid, color, msg[], {Float,_}:...);
native SendClientMessageToAllf(color, msg[], {Float,_}:...);
I know that can be done in PAWN but plugin implementation might be faster.
pawn Code:
#define BYTES_PER_CELL              4

stock SendClientMessageFormatted(playerid, color, fstring[], {Float, _}:...)
{
    static const STATIC_ARGS = 3;
    new n = (numargs() - STATIC_ARGS) * BYTES_PER_CELL;
    if(n)
    {
        new message[144],arg_start,arg_end;
        #emit CONST.alt        fstring
        #emit LCTRL          5
        #emit ADD
        #emit STOR.S.pri        arg_start

        #emit LOAD.S.alt        n
        #emit ADD
        #emit STOR.S.pri        arg_end
        do
        {
            #emit LOAD.I
            #emit PUSH.pri
            arg_end -= BYTES_PER_CELL;
            #emit LOAD.S.pri      arg_end
        }
        while(arg_end > arg_start);

        #emit PUSH.S          fstring
        #emit PUSH.C          144
        #emit PUSH.ADR         message

        n += BYTES_PER_CELL * 3;
        #emit PUSH.S          n
        #emit SYSREQ.C         format

        n += BYTES_PER_CELL;
        #emit LCTRL          4
        #emit LOAD.S.alt        n
        #emit ADD
        #emit SCTRL          4

        if(playerid == INVALID_PLAYER_ID)
        {
            #pragma unused playerid
            return SendClientMessageToAll(color, message);
        } else {
            return SendClientMessage(playerid, color, message);
        }
    } else {
        if(playerid == INVALID_PLAYER_ID)
        {
            #pragma unused playerid
            return SendClientMessageToAll(color, fstring);
        } else {
            return SendClientMessage(playerid, color, fstring);
        }
    }
}
Credits to Y_Less and ZeeX

that is fast and works well.
Reply

pawn Code:
stock SendClientMessageEx(playerid, color, const message[], va_args<>)
{
    new szString[145];

    va_format(szString, sizeof(szString), message, va_start<3>);
    SendClientMessage(playerid, color, szString);
}
This uses y_va (from YSI), it's more dynamic because if I want to create 10 different SendClientMessage derivations I just need that 3 lines above. Here's some real example I use:

Reply

You found secret show/hide player functions or you implemented them?

It's awesome!
Reply

That's not secret, I just have a minimal knowledge how things work in samp.
Reply

Quote:
Originally Posted by kurta999
View Post
That's not secret, I just have a minimal knowledge how things work in samp.
Suggestion: Add line of sight check(for 2 coordinates), thanks. I'm sure sa-mp already uses it for 3dtexts, player names and such.
Reply

Quote:
Originally Posted by wups
View Post
Suggestion: Add line of sight check(for 2 coordinates), thanks. I'm sure sa-mp already uses it for 3dtexts, player names and such.
But this is done client side, I can't do anything with this from serverside.
Reply

Quote:
Originally Posted by kurta999
View Post
But this is done client side, I can't do anything with this from serverside.
kurta999 - SetPlayerFakePing dont work?
Reply

Quote:
Originally Posted by LorDWarS
View Post
kurta999 - SetPlayerFakePing dont work?
Works, but now only in windows. I can't get RakPeer::UnregisterAsRemoteProcedureCall to work in linux..
Reply

Cool stuff i like thing with the gravity!
Reply

Quote:
Originally Posted by kurta999
View Post
Works, but now only in windows. I can't get RakPeer::UnregisterAsRemoteProcedureCall to work in linux..
i am with windows.. this is dont work..
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)