24.10.2011, 21:16
pawn Код:
stock SendClientMessageEx(playerid,color,type[],{Float,_}:...)
{
new string[128];
for(new i = 0;i<numargs() -2;i++)
{
switch(type[i])
{
case 's':
{
new result[128];
for(new a= 0;getarg(i +3,a) != 0;a++)
{
result[a] = getarg(i +3,a);
}
if(!strlen(string))
{
format(string,sizeof string,"%s",result);
} else format(string,sizeof string,"%s%s",string,result);
}
case 'i':
{
new result = getarg(i +3);
if(!strlen(string))
{
format(string,sizeof string,"%i",result);
} else format(string,sizeof string,"%s%i",string,result);
}
case 'f':
{
new Float:result = Float:getarg(i +3);
if(!strlen(string))
{
format(string,sizeof string,"%f",result);
} else format(string,sizeof string,"%s%f",string,result);
}
}
}
SendClientMessage(playerid,color,string);
return 1;
}