24.12.2010, 09:06
I have a team chat command it works but only shows the letters after the 3rd one
eg.
It should show for /ar test:
But shows:
/ar testing looks like this:
Is
to much for inbetween strings?
Any help?
The code:
Thanks In Advanced!
eg.
It should show for /ar test:
pawn Код:
** Name [0] At [A-F Radio]: test
pawn Код:
** Name [0] At [A-F Radio]:t
pawn Код:
** Name [0] At [A-F Radio]:ting
pawn Код:
At [A-F Radio]
Any help?
The code:
pawn Код:
CMD:ar(playerid, params[])
{
if(gTeam[playerid] == CLASS_AIRFORCE)
{
new output[100];
new string[100];
new pname[24];
if(!params[3]) return SendClientMessage(playerid, RED, "USAGE: /ao [msg]");
GetPlayerName(playerid, pname, 24);
strmid(output,params,3,strlen(params));
format(string, sizeof(string), "** %s [%d] At [A-F Radio]: %s",pname,playerid,output);
printf("%s", string);
for(new i=0;i<MAX_PLAYERS;i++)
{
if(gTeam[i] == CLASS_AIRFORCE)
{
format(string, sizeof(string), "** %s [%d] At [A-F Radio]: %s",pname,playerid,output);
AirforceRadio(WHITE,string);
}
}
}
else
{
SendClientMessage(playerid, RED, "Only The Airforce Can Use This Radio!");
}
return true;
}