Need Help In CnR Script[+REP] :)
#9

Код:
COMMAND:i(playerid, params[])
{
	return cmd_info(playerid, params);
}
COMMAND:info(playerid, params[])
{
	new string[256], giveplayerid;
	new vehicleid = GetPlayerVehicleID(giveplayerid);
	new modelid = GetVehicleModel(giveplayerid);
	if (sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_ERROR, "USAGE: /info [Playerid]");
	new Levelstr[256], Locstr[256], vstr[256];

	if (!IsPlayerConnected(giveplayerid))
	{
		format(string, sizeof(string), "%d Is Not A Valid ID.", giveplayerid);
		SendClientMessage(playerid, COLOR_ERROR, string);
		return 1;
	}

	if (PlayerInfo[giveplayerid][pTeam] == TEAM_LAW || PlayerInfo[giveplayerid][pVigilante] == 1)
	{

		format(Levelstr, sizeof(Levelstr), "~b~Level %d Rank: %s",PlayerInfo[giveplayerid][pLevel],PoliceRanks[PlayerInfo[giveplayerid][pRank]]);
	}
	else
	{
		switch (PlayerInfo[giveplayerid][pWantedLevel])
		{
			case 0:format(Levelstr, sizeof(Levelstr), "~w~Wanted Level %d Innocent Civilian",PlayerInfo[giveplayerid][pWantedLevel]);
			case 1..5:format(Levelstr, sizeof(Levelstr), "~y~Wanted Level %d",PlayerInfo[giveplayerid][pWantedLevel]);
			case 6..9:format(Levelstr, sizeof(Levelstr), "~r~Wanted Level %d",PlayerInfo[giveplayerid][pWantedLevel]);
			case 10:format(Levelstr, sizeof(Levelstr), "~r~Wanted Level %d Most Wanted",PlayerInfo[giveplayerid][pWantedLevel]);
		}
	}
	if (PlayerInfo[giveplayerid][pSpawn] == 0)
	{
		Locstr = "~r~Dead in Whole Somewhere";
	}
	else if (PlayerInfo[giveplayerid][pSpecID] > -1 || PlayerInfo[giveplayerid][AdminDuty] == 1)
	{
		Locstr = "~p~San Andreas";
	}
	else
	{
		format(Locstr, sizeof(Locstr), "~p~%s",PlayerInfo[giveplayerid][pLocation]);
	}

	if (IsPlayerInVehicle(giveplayerid,vehicleid))
	{
		format(vstr, sizeof(vstr), "~p~In %s",aVehicleNames[modelid - 400]);
	}
	else
	{
		vstr = "~p~On Foot";
	}
	if (PlayerInfo[giveplayerid][pTeam] == TEAM_LAW)
	{
		HideAllServerTextDraws(playerid);
		HideTextDrawMenu(playerid);
		format(string, sizeof(string), "~g~Player Information~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_");
		TextDrawSetString(InfoTD0, string);

		format(string, sizeof(string), "~b~%s (%d)~n~~n~~w~Skill: ~b~%s~n~%s~n~~n~~w~Location:~n~%s~n~~w~%s",
		PlayerInfo[giveplayerid][pName],giveplayerid,
		SkillNames[PlayerInfo[giveplayerid][pSkill]],
		Levelstr,
		Locstr,
		vstr);
		TextDrawSetString(InfoTD1, string);

		format(string, sizeof(string), "Press~y~ LMB~w~ To Close The Box");
		TextDrawSetString(InfoTD2, string);


		TextDrawShowForPlayer(playerid, InfoTD0);
		TextDrawShowForPlayer(playerid, InfoTD1);
		TextDrawShowForPlayer(playerid, InfoTD2);
	}
	else
	{
		HideAllServerTextDraws(playerid);
		HideTextDrawMenu(playerid);
		format(string, sizeof(string), "~g~Player Information~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_~n~_");
		TextDrawSetString(InfoTD0, string);

		format(string, sizeof(string), "~b~%s (%d)~n~~n~~w~Skill:~g~ %s~n~~n~%s~n~~w~Location: ~n~%s~n~~w~%s",
		PlayerInfo[giveplayerid][pName],
		giveplayerid,
		SkillNames[PlayerInfo[giveplayerid][pSkill]],
		Levelstr,
		Locstr,
		vstr);
		TextDrawSetString(InfoTD1, string);

		format(string, sizeof(string), "Press~y~ LMB~w~ To Close The Box");
		TextDrawSetString(InfoTD2, string);


		TextDrawShowForPlayer(playerid, InfoTD0);
		TextDrawShowForPlayer(playerid, InfoTD1);
		TextDrawShowForPlayer(playerid, InfoTD2);
	}
	return 0;
}
Try this one.
Reply


Messages In This Thread
Need Help In CnR Script[+REP] :) - by Devon007 - 06.06.2015, 14:17
Re: Need Help In CnR Script[+REP] :) - by Dangjai - 06.06.2015, 14:19
Re: Need Help In CnR Script[+REP] :) - by Devon007 - 06.06.2015, 14:26
Re: Need Help In CnR Script[+REP] :) - by Devon007 - 06.06.2015, 14:31
Re: Need Help In CnR Script[+REP] :) - by Dangjai - 06.06.2015, 14:38
Re: Need Help In CnR Script[+REP] :) - by Dangjai - 06.06.2015, 14:41
Re: Need Help In CnR Script[+REP] :) - by Devon007 - 06.06.2015, 14:50
Re: Need Help In CnR Script[+REP] :) - by Devon007 - 06.06.2015, 15:20
Re: Need Help In CnR Script[+REP] :) - by Dangjai - 06.06.2015, 15:55
Re: Need Help In CnR Script[+REP] :) - by Devon007 - 06.06.2015, 17:34

Forum Jump:


Users browsing this thread: 1 Guest(s)