Help with /hi
#1

The command does not work.

Код:
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;
  }
2 Warnings:
Код:
warning 219: local variable "tmp" shadows a variable at a preceding level
warning 219: local variable "string" shadows a variable at a preceding level
In what the reason?
Reply


Messages In This Thread
Help with /hi - by Aram555 - 16.01.2010, 22:36
Re: Help with /hi - by GTAguillaume - 16.01.2010, 22:38
Re: Help with /hi - by s0nic - 17.01.2010, 00:20
Re: Help with /hi - by Aram555 - 17.01.2010, 01:47

Forum Jump:


Users browsing this thread: 1 Guest(s)