17.07.2014, 20:09
So I have a problem with this stock it won't show string but integer will show
example:
SCMF(playerid,white,"Hello %s your level know is %d",name,level); so in this line it won't show %s it will be like this
SCMF(playerid,white,"Hello your level know is %d",name,level); like you see this function won't show any %s
here is the stock
example:
SCMF(playerid,white,"Hello %s your level know is %d",name,level); so in this line it won't show %s it will be like this
SCMF(playerid,white,"Hello your level know is %d",name,level); like you see this function won't show any %s
here is the stock
pawn Код:
stock SCMF(playerid,color,fstring[],{Float,_}:...)
{
new n=(numargs()-3)*4;
if(n)
{
new message[128],arg_start,arg_end;
#emit CONST.alt fstring
#emit LCTRL 5
#emit ADD
#emit STOR.S.pri arg_start
#emit LOAD.S.alt n
#emit ADD
#emit STOR.S.pri arg_end
do
{
#emit LOAD.I
#emit PUSH.pri
arg_end-=4;
#emit LOAD.S.pri arg_end
}
while(arg_end>arg_start);
#emit PUSH.S fstring
#emit PUSH.C 255
#emit PUSH.ADR message
n+=4*3;
#emit PUSH.S n
#emit SYSREQ.C format
n+=4;
#emit LCTRL 4
#emit LOAD.S.alt n
#emit ADD
#emit SCTRL 4
return SCM(playerid,color,message);
}
else return SCM(playerid,color,fstring);
}