How to make this command /getinfo show the players weapons name
#3

Quote:
Originally Posted by kman
check if this works


Код:
 if(strcmp(cmd, "/getinfo", true) == 0 && Isplayeradmin[playerid] ) // Displays Some Player Info
	{
  tmp = strtok(cmdtext, idx);
  if(!strlen(tmp)) {
  SendClientMessage(playerid, COLOR_ERROR, "USAGE: /getinfo (id)");
  return 1;
  }
  giveplayerid = strval(tmp);
  if(!IsNumeric(tmp)) {
  SendClientMessage(playerid, COLOR_ERROR, "USAGE: /getinfo (id) ID Must be a number");
  return 1;
  }
  if(!IsPlayerConnected(giveplayerid)) {
  format(string, sizeof(string), "ID (%d) Is not an active player",giveplayerid);
  SendClientMessage(playerid, COLOR_ERROR, string);
  return 1;
  }
  new pname[24];
  new adminname[24];
  new Float:phealth;
  new Float:parmor;
  new playercash = GetPlayerMoney(giveplayerid);
  new wep0,ammo0;
  new ipstring[25];
  new pping;
  pping = GetPlayerPing(playerid);
  GetPlayerIp(giveplayerid,ipstring,255);
	GetPlayerWeaponData(giveplayerid,7,wep0,ammo0);
  GetPlayerName(giveplayerid, pname, 24);
  GetPlayerName(playerid,adminname,24);
  GetPlayerHealth(giveplayerid,phealth);
  GetPlayerArmour(giveplayerid,parmor);
No, thats a totally different command
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)