ZCMD and sscanf won't work for me :(
#1

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;
}
Reply
#2

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.
Reply
#3

try this
pawn Код:
CMD:kick(playerid,params[])
{
   new id,res[50];
   if(sscanf(params,"uz",id,res)) return SendClientMessage(playerid,-1," -___-");
   Kick(id);
}
Reply
#4

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)