02.03.2009, 18:36
this is /cb
And search for /takeoff and /land.
pawn Код:
if(strcmp(cmd, "/cb", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new string[128];
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_COLOR, "USAGE: /cb [radio chat]");
return 1;
}
format(string, sizeof(string), "CB Radio: %s says: %s, sendername, result);
SendClientMessageToAll(COLOR_COLOR,string);
printf("%s", string);
return 1;
}
return 1;
}