SA-MP Forums Archive
Problem with sscanf & zcmd - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Problem with sscanf & zcmd (/showthread.php?tid=235297)



Problem with sscanf & zcmd - Ukrainian - 05.03.2011

Hi all,help my pls...
When i use zcmd and sscanf plugins,commands,created with standart method dont working.
P.S. Sorry for bad ENG


Re: Problem with sscanf & zcmd - xir - 05.03.2011

Can you show how you make your cmd?


Re: Problem with sscanf & zcmd - Ukrainian - 05.03.2011

Cmd,created with sscanf and zcmd:
PHP код:
COMMAND:fr(playerid,param[])
{
    if(
fraction[playerid] == 1) return SendClientMessage(playerid,0xff0034AA,"Òû íå íàõîäèøüñÿ â ôðàêöèè");
    new 
message[256],str[256];
    new 
str2[256];
    new 
n[MAX_PLAYER_NAME];
    new 
fsel[128];
    if(
fraction[playerid]==2format(fsel,sizeof(fsel),"LSRK");
    if(
fraction[playerid]==3format(fsel,sizeof(fsel),"ÌèíÇäðàâ");
    if(
fraction[playerid]==4format(fsel,sizeof(fsel),"Ìýðèÿ");
    if(
fraction[playerid]==5format(fsel,sizeof(fsel),"Ïîëèöèÿ");
    if(
fraction[playerid]==6format(fsel,sizeof(fsel),"Ñåìüÿ Ôîðåëëè");
    if(
fraction[playerid]==7format(fsel,sizeof(fsel),"Ñåìüÿ Ãóðèíî");
    if(
fraction[playerid]==8format(fsel,sizeof(fsel),"Ñåìüÿ Ãðàíàäîñ");
    if(
fraction[playerid]==9format(fsel,sizeof(fsel),"Êèëëåðû");
    if(
sscanf(param,"s",message)) return SendClientMessage(playerid,0xff0034AA,"/fr [òåêñò]");
     
GetPlayerName(playerid,n,MAX_PLAYER_NAME);
    
format(str,256,"{6EF83C}[%s]%s(%i ðàíã)ñêàçàë:%s" ,fsel,n,rank[playerid],message);
    
SendFractionMessage(playerid,str);
    
format(str2,256,"%s ñêàçàë â ðàöèþ:%s" ,n,message);
    
ProxDetector(5,playerid,str2,0xFFFFFFAA,0xFFFFFFAA,0xFFFFFFAA,0xFFFFFFAA,0xFFFFFFAA);
    return 
1;

Cmd,created with standart method,she is"nt working:
PHP код:
        if(strcmp(cmd"/moneys"true) == 0)
{
GivePlayerMoney(playerid,5000);
        return 
1;
    } 



Re: Problem with sscanf & zcmd - Lorrden - 05.03.2011

So none of these works?
What's the problem?
Errors?


Re: Problem with sscanf & zcmd - HyperZ - 05.03.2011

If you are using zcmd and strcmp commands too than strcmps will not work.


Re: Problem with sscanf & zcmd - xir - 05.03.2011

Also post your code in pawn tags

[ pawn ] [ /pawn ]