0.3d zcmd question - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: 0.3d zcmd question (
/showthread.php?tid=293118)
0.3d zcmd question -
Tigerkiller - 27.10.2011
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
Re: 0.3d zcmd question -
CyNiC - 27.10.2011
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.
Re: 0.3d zcmd question -
Tigerkiller - 27.10.2011
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
Re: 0.3d zcmd question - Guest3598475934857938411 - 27.10.2011
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.
Re: 0.3d zcmd question -
Tigerkiller - 27.10.2011
lool omg why you all cant read ?
Re: 0.3d zcmd question -
|_ⒾⓇⓄN_ⒹⓄG_| - 27.10.2011
read this
https://sampwiki.blast.hk/wiki/Strtok
Re: 0.3d zcmd question -
Rachael - 27.10.2011
sscanf seems to be working fine for me.
But then I don't use the 'u' specifier.
food for thought.
Re: 0.3d zcmd question -
Ash. - 27.10.2011
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.
Re: 0.3d zcmd question -
Tigerkiller - 27.10.2011
@Rachael:
which sscanf version do you use and what you use for integer "u" ?
hmm i will look around sscanf