player info
#1

hello i have make on command /info [id] but when i try to see another player info it dosn't work.
Here is my Code
pawn Код:
if (strcmp(cmdtext, "/info", true) == 0)
    {
    new tmp[MAX_SERVER_STRING]; tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_WHITE, "/info [id]");
    return 1;
    }
    if(!IsNumeric(tmp))
    {
      SendClientMessage(playerid, COLOR_RED1, "ERROR: You must put a valid ID! Not a name!");
      return 1;
    }
    player = strval(tmp);
    if(!IsPlayerConnected(player))
    {
      SendClientMessage(playerid, COLOR_RED1, "Player not found.");
      return 1;
    }
    new current_zone = player_zone[player];
    new string[256];
    new pName[MAX_PLAYER_NAME];
    GetPlayerName(player,pName,MAX_PLAYER_NAME);
    format(string,sizeof string,"Player: %s ",pName);
    SendClientMessage(player,0xE89B5BBB ,string);
    format(string,sizeof string,"FPS: %d",FPS2[player]);
    SendClientMessage(player,-1 ,string);
    format(string,sizeof string,"Ping: %d",GetPlayerPing(player));
    SendClientMessage(player,-1 ,string);
    format(string,sizeof string,"Kills Spree: %d",Kills[player]);
    SendClientMessage(player,-1 ,string);
    return 1;
}
Reply


Messages In This Thread
player info - by ScRipTeRi - 02.01.2014, 09:59
Re: player info - by dominik523 - 02.01.2014, 10:07
Re: player info - by ScRipTeRi - 02.01.2014, 10:08
Re : player info - by [HRD]Mar1 - 02.01.2014, 10:13
Re: player info - by ScRipTeRi - 02.01.2014, 10:21
Re : player info - by [HRD]Mar1 - 02.01.2014, 10:37
Re: player info - by Schocc - 02.01.2014, 10:38

Forum Jump:


Users browsing this thread: 2 Guest(s)