/checkplayer command!
#4

here dude try it

Код:
if(strcmp("/getinfo", cmd, true) == 0)
	{
		new tmp[256], cmdid;
		tmp = strtok(cmdtext, idx);
		if(GetPlayerLevel(playerid) < 1) return SendClientMessage(playerid, red, "You are not permitted to use this");
		if(!strlen(tmp)) return SendClientMessage(playerid, red, "You did not put in an id");
		if(IsPlayerConnected(strval(tmp)) == 0) return SendClientMessage(playerid, red, "That player is not connected");
		cmdid = strval(tmp);

		new oname[MAX_PLAYER_NAME];
		GetPlayerName(cmdid, oname, sizeof(oname));

		new string[256];

		SendClientMessage(playerid, green, "===INFO===");

		format(string, sizeof(string), "Name: %s", oname);
		SendClientMessage(playerid, green, string);

		format(string, sizeof(string), "ID: %d", cmdid);
		SendClientMessage(playerid, green, string);

		format(string, sizeof(string), "Cash: %d", GetPlayerMoney(cmdid));
		SendClientMessage(playerid, green, string);

		format(string, sizeof(string), "Score: %d", GetPlayerScore(cmdid));
		SendClientMessage(playerid, green, string);

		format(string, sizeof(string), "Kills: %d", dUserINT(PlayerName(playerid)).("kills"));
		SendClientMessage(playerid, green, string);
		
		format(string, sizeof(string), "Deaths: %d", dUserINT(PlayerName(playerid)).("deaths"));
		SendClientMessage(playerid, green, string);
}
}
return 1;
}
Reply


Messages In This Thread
/checkplayer command! - by Champ - 02.08.2013, 08:17
Re: /checkplayer command! - by xXxThunderxXx - 02.08.2013, 08:26
Re: /checkplayer command! - by Champ - 02.08.2013, 13:29
Re: /checkplayer command! - by dEcooR - 02.08.2013, 13:43
Re: /checkplayer command! - by Champ - 02.08.2013, 14:51

Forum Jump:


Users browsing this thread: 1 Guest(s)