ZCMD and sscanf won't work for me :( - 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: ZCMD and sscanf won't work for me :( (
/showthread.php?tid=445560)
ZCMD and sscanf won't work for me :( -
MrWakeUp - 21.06.2013
i wonder if i'm wrong in the script or if the probleme come from my samp if i'm wrong correct me please

here is the pawn code ofcorse with
#include <zcmd>
#include <sscanf2>
// i will make a kick command for test ( i already did that and it did not work )
Код:
CMD:kick(playerid, params[])
{
new kickedid, kickerid, kickedn[MAX_PLAYER_NAME+128], kickern[MAX_PLAYER_NAME+128], reason[128], kickmessage[128];
GetPlayerName(playerid, kickern, sizeof(kickern));
GetPlayerName(playerid, kickedn, sizeof(kickedn));
if (sscanf(params, "us", kickedid, reason)) return SendClientMessage(playerid, 0xFF0000FF, "KICK: /kick (id) (reason)");
format(kickmessage, sizeof(kickmessage), "le joueur %s (ID:%d) vient d'кtre kickй par %s (ID:%d) || raison: %s", kickedn, kickedid, kickern, kickerid,reason);
SendClientMessageToAll(0xFF3900FF, kickmessage);
Kick(kickedid);
return 1;
}
Re: ZCMD and sscanf won't work for me :( -
SomebodyAndMe - 21.06.2013
Do you use strcmp for other commands in your script?
If yes, you will either have to convert them to zcmd, or convert the zcmd to strcmp.
Re: ZCMD and sscanf won't work for me :( -
DaTa[X] - 21.06.2013
try this
pawn Код:
CMD:kick(playerid,params[])
{
new id,res[50];
if(sscanf(params,"uz",id,res)) return SendClientMessage(playerid,-1," -___-");
Kick(id);
}
Re: ZCMD and sscanf won't work for me :( -
MrWakeUp - 21.06.2013
Quote:
Originally Posted by SomebodyAndMe
Do you use strcmp for other commands in your script?
If yes, you will either have to convert them to zcmd, or convert the zcmd to strcmp.
|
i did and it didn't ,work