make text to dialog
#6

Quote:
Originally Posted by Lidor124
Посмотреть сообщение
I added new define of string, it will fix the errors
OOMMGGG! THANKS!!@!! And lastly this one is really complicated but I hope you can help me with this. Also make this to dialog. Anyway I gave you +rep

Код:
CMD:getinfo(playerid,params[])
{
		new id, WeapName[32], slot, weap, ammo, model , Float:Health , Float:Armour,Float:Vheath,Count = 0;
	    if(sscanf(params, "u",id)) return SendClientMessage(playerid, yellow, "Usage: /getinfo <Part of Nick/Player ID>");
	 	if(IsPlayerConnected(id))
	    {
            GetPlayerArmour(id,Armour);
			GetPlayerHealth(id,Health);
			CommandToAdmins(playerid,"info");
            format(Jstring, sizeof(Jstring), "__Informations for: %s(%d)__",GetName(id) ,id);
			SendClientMessage(playerid, green, Jstring);
			if(IsPlayerInAnyVehicle(id))
			{
				GetVehicleHealth(GetPlayerVehicleID(id), Vheath);
				model = GetVehicleModel(GetPlayerVehicleID(id));
				format(Jstring, sizeof(Jstring), "Health: %0.1f | Armour: %0.1f | Ratio: %0.2f | Ping: %d | Current vehicle: %s(Model: %d) | Vehicle health: %0.1f", Health , Armour,   Float:pInfo[id][Kills]/Float:pInfo[id][Deaths],GetPlayerPing(id),VehicleNames[model-400],model,Vheath);
			}
			else
			format(Jstring, sizeof(Jstring), "Health: %0.1f | Armour: %0.1f | Kills: %d | Deaths: %d |Ratio: %0.2f | Ping: %d", Health , Armour, pInfo[id][Kills],pInfo[id][Deaths], Float:pInfo[id][Kills]/Float:pInfo[id][Deaths],GetPlayerPing(id));
			SendClientMessage(playerid, orange, Jstring);
			for(slot = 0; slot < 13; slot++)
			{
			   GetPlayerWeaponData(id, slot, weap, ammo);
			   if( ammo != 0 && weap != 0)
			   Count++;
			}
	        if(Count == 0)
			{
				format(Jstring, sizeof(Jstring), "%s has no weapons!",GetName(id));
				return SendClientMessage(playerid,green,Jstring);
			}
			else
			{
				format(Jstring, sizeof(Jstring), "__%s's weapons__",GetName(id));
		        SendClientMessage(playerid,red,Jstring);
			}
	        if(Count >= 1)
		    {
				for (slot = 0; slot < 13; slot++)
				{
				     GetPlayerWeaponData(id, slot, weap, ammo);
				     if( ammo != 0 && weap != 0)
				     {
				        GetWeaponName(weap, WeapName, sizeof(WeapName));
				        format(Jstring,sizeof(Jstring),"%s (%d)", WeapName, ammo);
				        SendClientMessage(playerid, orange, Jstring);
	                 }
                }
            }
            return 1;
		}
		else return ShowMessage(playerid, red, 2);
}
Reply


Messages In This Thread
make text to dialog - by kbalor - 29.09.2013, 06:33
Re: make text to dialog - by kbalor - 29.09.2013, 15:22
Re: make text to dialog - by Dragonsaurus - 29.09.2013, 15:49
Re: make text to dialog - by kbalor - 29.09.2013, 16:38
Re: make text to dialog - by Lidor124 - 29.09.2013, 16:45
Re: make text to dialog - by kbalor - 29.09.2013, 17:33

Forum Jump:


Users browsing this thread: 1 Guest(s)