Re: YSF - kurta999's version -
QuaTTrO - 16.07.2014
Quote:
Originally Posted by LorDWarS
but, how can I bulid it?
|
Ask in SA-MP+ thread.
Re: YSF - kurta999's version -
LorDWarS - 16.07.2014
Quote:
Originally Posted by QuaTTrO
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
Re: YSF - kurta999's version -
QuaTTrO - 16.07.2014
Quote:
Originally Posted by LorDWarS
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);
Re: YSF - kurta999's version -
Dubya - 16.07.2014
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
Re: YSF - kurta999's version -
SimonItaly - 16.07.2014
Please, stop spamming about keyboard detection in every plugin thread.
It's not going to happen.
Re: YSF - kurta999's version -
kurta999 - 16.07.2014
Quote:
Originally Posted by QuaTTrO
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.
Re: Respuesta: YSF - kurta999's version -
QuaTTrO - 17.07.2014
Quote:
Originally Posted by LorDWarS
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.
Re: YSF - kurta999's version -
paulommu - 17.07.2014
Quote:
Originally Posted by QuaTTrO
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).
Re: Respuesta: YSF - kurta999's version -
LorDWarS - 17.07.2014
Quote:
Originally Posted by QuaTTrO
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!
Re: YSF - kurta999's version -
RCON1 - 17.07.2014
Quote:
Originally Posted by QuaTTrO
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
Re: YSF - kurta999's version -
PT - 17.07.2014
Quote:
Originally Posted by QuaTTrO
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.
Re: YSF - kurta999's version -
paulommu - 17.07.2014
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:
Re: YSF - kurta999's version -
erorcun - 17.07.2014
You found secret show/hide player functions or you implemented them?
It's awesome!
Re: YSF - kurta999's version -
kurta999 - 18.07.2014
That's not secret, I just have a minimal knowledge how things work in samp.
Re: YSF - kurta999's version -
wups - 18.07.2014
Quote:
Originally Posted by kurta999
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.
Re: YSF - kurta999's version -
kurta999 - 18.07.2014
Quote:
Originally Posted by wups
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.
Re: YSF - kurta999's version -
LorDWarS - 18.07.2014
Quote:
Originally Posted by kurta999
But this is done client side, I can't do anything with this from serverside.
|
kurta999 - SetPlayerFakePing dont work?
Re: YSF - kurta999's version -
kurta999 - 18.07.2014
Quote:
Originally Posted by LorDWarS
kurta999 - SetPlayerFakePing dont work?
|
Works, but now only in windows. I can't get RakPeer::UnregisterAsRemoteProcedureCall to work in linux..
Re: YSF - kurta999's version -
MrWupiazZzLT - 18.07.2014
Cool stuff i like thing with the gravity!
Re: YSF - kurta999's version -
LorDWarS - 18.07.2014
Quote:
Originally Posted by kurta999
Works, but now only in windows. I can't get RakPeer::UnregisterAsRemoteProcedureCall to work in linux..
|
i am with windows.. this is dont work..