0.3d zcmd question
#1

hi community.
since i use 0.3d i got a problem

i cant use zcmd + sscanf and i dont want to wait for the new realease.

my question are:
how can i use zcmd whitout sscanf but has the same effect ?

hope you know what i want
Reply
#2

https://sampforum.blast.hk/showthread.php?tid=282902

****** will update the sscanf when 0.3d is released, if I were you, wait for the release.
Reply
#3

i dont want to wait for it
i asked how did i make it so that when i use maybe /kick he must enter /kick playerid reason whitout sscanf
Reply
#4

You got to wait for it. SA-MP 0.3d is released for developments things only. For people to update their plugins to updating servers.
Reply
#5

lool omg why you all cant read ?
Reply
#6

read this
https://sampwiki.blast.hk/wiki/Strtok

Reply
#7

sscanf seems to be working fine for me.
But then I don't use the 'u' specifier.

food for thought.
Reply
#8

Quote:
Originally Posted by Rachael
Посмотреть сообщение
sscanf seems to be working fine for me.
But then I don't use the 'u' specifier.

food for thought.
sscanf is fine without the use of "r" and "u". You can use all the other specifiers without problems. Those two specifiers use the SAMP servers internal memory addresses to access and use data from the internal player list; obviously with ANY new release of the SAMP server, these memory addresses will change. (Though I believe sscanf uses structure offsets rather than absolute addresses, so it may survive new versions, but not this time).

I believe zcmd has a 'params' parameter. To create a simple kick command you could do:
pawn Код:
CMD:kick(playerid, params[])
{
     if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF00FFFF, "ERROR");
     if(!strlen(params)) return SendClientMessage(playerid, 0xFF00FFFF, "ERROR");
     if(!IsPlayerConnected(strval(params))) return SendClientMessage(playerid, 0xFF00FFFF, "ERROR");
     return Kick(strval(params));
}
Obviously, that doesn't have a "reason" though.
Reply
#9

@Rachael:

which sscanf version do you use and what you use for integer "u" ?

hmm i will look around sscanf
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)