15.06.2015, 10:14
Hi guys,
First I show my CMD :
The problem is here that, When I type "/cnnnn Hi Guys" for example, It only shows "Guys" word.
I want to get "Hi Guys" not only "Guys".
Also , displayCenterHUDInfo is like SendClientMessage ...
+Rep for the best answer.
First I show my CMD :
pawn Код:
if(strcmp(cmd, "/cnnnn", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] >= 3)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Dastoor: /cnnnn <text> ");
return 1;
}
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[128];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
format(string, sizeof(string), "%s",result);
foreach (Player, i)
{
if(IsPlayerConnected(i) == 1)
{
displayCenterHUDInfo(i, string, 5);
}
}
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Shoma dastresie kafi baraye anjame inkar ra nadarid !");
return 1;
}
}
I want to get "Hi Guys" not only "Guys".
Also , displayCenterHUDInfo is like SendClientMessage ...
+Rep for the best answer.