make text to dialog
#1

Can anyone make this to dialog message? Thank you. Looking forward. I tried to make it to dialog but its not working all empty.

Код:
CMD:aka(playerid,params[])
{
    if(pInfo[playerid][pLevel] >= 1)
	{
		new id,Ffile[128],string[128];
	    if(sscanf(params, "u", id)) return SendClientMessage(playerid, yellow, "Usage: /aka <Player ID/Part of Nick>");
	 	if(IsPlayerConnected(id))
	    {
            strdel(aka,0,256);
            CommandToAdmins(playerid,"aka");
  		  	GetPlayerIp(id,playerIP,16);
  		  	format(Ffile,sizeof(Ffile),"JLadmin/Logs/aka.ini");
  		  	INI_ParseFile(Ffile,"GetAkaLog");
			format(Jstring,sizeof(Jstring),">> Player %s(ID: %d)'s Nick names", GetName(id), id);
   	        SendClientMessage(playerid,green,Jstring);
		    if(strlen(aka) > 70)
			{
		        strmid(string,aka,0,75);
		        format(Jstring,sizeof(Jstring),">> IP: %s - Nicks: %s", playerIP , string);
				SendClientMessage(playerid,yellow,Jstring);
				strmid(string,aka,75,sizeof(aka));
				format(Jstring, sizeof(Jstring),"%s", string);
				SendClientMessage(playerid,yellow,Jstring);
			}
			else
			{
			    format(string,sizeof(string),">> IP: %s - Nicks: %s", playerIP, aka);
				SendClientMessage(playerid,yellow,string);
		    }
	        return 1;
		}
		else return ShowMessage(playerid, red, 2);
	}
	else return ShowMessage(playerid, red, 1);
}
Reply
#2

Anyone? please thanks you in advance!
Reply
#3

pawn Код:
CMD:aka(playerid,params[])
{
    if(pInfo[playerid][pLevel] >= 1)
    {
        new id,Ffile[128],dstring[128];
        if(sscanf(params, "u", id)) return SendClientMessage(playerid, yellow, "Usage: /aka <Player ID/Part of Nick>");
        if(IsPlayerConnected(id))
        {
            strdel(aka,0,256);
            CommandToAdmins(playerid,"aka");
            GetPlayerIp(id,playerIP,16);
            format(Ffile,sizeof(Ffile),"JLadmin/Logs/aka.ini");
            INI_ParseFile(Ffile,"GetAkaLog");
            format(dstring,sizeof(dstring),">> Player %s(ID: %d)'s Nick names\n", GetName(id), id);
            if(strlen(aka) > 70)
            {
                strmid(string,aka,0,75);
                format(dstring,sizeof(dstring),"%s>> IP: %s - Nicks: %s\n", playerIP , string);
                strmid(string,aka,75,sizeof(aka));
                format(dstring, sizeof(dstring),"%s%s", string);
            }
            else
            {
                format(dstring,sizeof(dstring),">> IP: %s - Nicks: %s", playerIP, aka);
            }
                ShowPlayerDialog(playerid, 1234, DIALOG_STYLE_MSGBOX, "AKA", dstring, "Close", "");
            return 1;
        }
        else return ShowMessage(playerid, red, 2);
    }
    else return ShowMessage(playerid, red, 1);
}
Reply
#4

Quote:
Originally Posted by Dragonsaurus
Посмотреть сообщение
pawn Код:
CMD:aka(playerid,params[])
{
    if(pInfo[playerid][pLevel] >= 1)
    {
        new id,Ffile[128],dstring[128];
        if(sscanf(params, "u", id)) return SendClientMessage(playerid, yellow, "Usage: /aka <Player ID/Part of Nick>");
        if(IsPlayerConnected(id))
        {
            strdel(aka,0,256);
            CommandToAdmins(playerid,"aka");
            GetPlayerIp(id,playerIP,16);
            format(Ffile,sizeof(Ffile),"JLadmin/Logs/aka.ini");
            INI_ParseFile(Ffile,"GetAkaLog");
            format(dstring,sizeof(dstring),">> Player %s(ID: %d)'s Nick names\n", GetName(id), id);
            if(strlen(aka) > 70)
            {
                strmid(string,aka,0,75);
                format(dstring,sizeof(dstring),"%s>> IP: %s - Nicks: %s\n", playerIP , string);
                strmid(string,aka,75,sizeof(aka));
                format(dstring, sizeof(dstring),"%s%s", string);
            }
            else
            {
                format(dstring,sizeof(dstring),">> IP: %s - Nicks: %s", playerIP, aka);
            }
                ShowPlayerDialog(playerid, 1234, DIALOG_STYLE_MSGBOX, "AKA", dstring, "Close", "");
            return 1;
        }
        else return ShowMessage(playerid, red, 2);
    }
    else return ShowMessage(playerid, red, 1);
}
thanks but I have warningss...

Код:
(5688) : error 017: undefined symbol "string"
(5689) : error 017: undefined symbol "string"
(5690) : error 017: undefined symbol "string"
(5690) : error 035: argument type mismatch (argument 2)
(5691) : error 017: undefined symbol "string"
Line

Код HTML:
                strmid(string,aka,0,75);
                format(dstring,sizeof(dstring),"%s>> IP: %s - Nicks: %s\n", playerIP , string);
                strmid(string,aka,75,sizeof(aka));
                format(dstring, sizeof(dstring),"%s%s", string);
Reply
#5

Quote:

CMD:aka(playerid,params[])
{
new string[128];
if(pInfo[playerid][pLevel] >= 1)
{
new id,Ffile[128],dstring[128];
if(sscanf(params, "u", id)) return SendClientMessage(playerid, yellow, "Usage: /aka <Player ID/Part of Nick>");
if(IsPlayerConnected(id))
{
strdel(aka,0,256);
CommandToAdmins(playerid,"aka");
GetPlayerIp(id,playerIP,16);
format(Ffile,sizeof(Ffile),"JLadmin/Logs/aka.ini");
INI_ParseFile(Ffile,"GetAkaLog");
format(dstring,sizeof(dstring),">> Player %s(ID: %d)'s Nick names\n", GetName(id), id);
if(strlen(aka) > 70)
{
strmid(string,aka,0,75);
format(dstring,sizeof(dstring),"%s>> IP: %s - Nicks: %s\n", playerIP , string);
strmid(string,aka,75,sizeof(aka));
format(dstring, sizeof(dstring),"%s%s", string);
}
else
{
format(dstring,sizeof(dstring),">> IP: %s - Nicks: %s", playerIP, aka);
}
ShowPlayerDialog(playerid, 1234, DIALOG_STYLE_MSGBOX, "AKA", dstring, "Close", "");
return 1;
}
else return ShowMessage(playerid, red, 2);
}
else return ShowMessage(playerid, red, 1);
}

I added new define of string, it will fix the errors
Reply
#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


Forum Jump:


Users browsing this thread: 2 Guest(s)