16.01.2010, 22:36
The command does not work.
2 Warnings:
In what the reason?
Код:
if (strcmp(cmd, "/hi", true) == 0)
{
new tmp[256],id;
tmp = strtok(cmdtext, idx);
if (!strlen(tmp)) return SendClientMessage(playerid, 0xFF0000AA, "ПРИМИНЕНИЕ: /hi id ");
id = strval(tmp);
if (!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xFF0000AA, "Такой игрок не подключён!");
new string[255],plname[24],idname[24];
GetPlayerName(playerid,plname,sizeof(plname));
GetPlayerName(id,idname,sizeof(idname));
format(string,sizeof(string),".:: %s приветствует %s",plname,idname);
SendClientMessageToAll(0x00FF00AA,string);
return 1;
}
Код:
warning 219: local variable "tmp" shadows a variable at a preceding level warning 219: local variable "string" shadows a variable at a preceding level

