ShowPlayerDialog
#1

Deci am facut comanda /info asa:
Code:
if(strcmp(cmd, "/info", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
            new String[3000];
            format( String, sizeof String, "____________________ Server Info ____________________\n");
            format( String, sizeof String, "» Name:[Romania]*GameSpeed Comunity*[0.3d]\n");
	    format( String, sizeof String, "» Ip: 93.114.82.66:7777\n",String);
	    format( String, sizeof String, "» Date Of Inauguration: 5.1.2011\n",String);
	    format( String, sizeof String, "» Slots: 60\n",String);
	    format( String, sizeof String, "» Version: GameSpeed v1.1\n",String);
	    format( String, sizeof String, "» Owners: RuSke & Tequila\n",String);
	    format( String, sizeof String, "» Scripter: RuSke\n",String);
	    format( String, sizeof String, "» Mapper: Tequila\n",String);
	    format( String, sizeof String, "» Forum: GameSpeed.funkiZone.Com\n",String);
	    format( String, sizeof String, "» Map: San Andreas\n",String);
	    ShowPlayerDialog(playerid,1,0,"{FF0000}Server InFo",String,"Ok", "");
        }
		return 1;
	}
DAr am o mica problema , cand dau/info imi apare doar "Map: San Andreas" cum fac sa apara si celelalte
Reply
#2

pawn Code:
new String[3000];
            strcat( String,  "____________________ Server Info ____________________\n");
            strcat( String,  "» Name:[Romania]*GameSpeed Comunity*[0.3d]\n");
        strcat( String,  "» Ip: 93.114.82.66:7777\n");
        strcat( String,  "» Date Of Inauguration: 5.1.2011\n");
        strcat( String,  "» Slots: 60\n");
        strcat( String,  "» Version: GameSpeed v1.1\n");
        strcat( String,  "» Owners: RuSke & Tequila\n");
        strcat( String,  "» Scripter: RuSke\n");
        strcat( String,  "» Mapper: Tequila\n");
        strcat( String,  "» Forum: GameSpeed.funkiZone.Com\n");
        strcat( String,  "» Map: San Andreas\n");
        ShowPlayerDialog(playerid,1,0,"{FF0000}Server InFo",String,"Ok", "");
Reply
#3

512 is enough. Also, the format and string at the end are wrong.
pawn Code:
if( strcmp( cmdtext, "/info", true ) == 0 )
{
    if( IsPlayerConnected( playerid ) ) {
        new
            String[ 512 ];

        strcat( String, "____________________ Server Info ____________________\n" );
        strcat( String, "» Name:[Romania]*GameSpeed Comunity*[0.3d]\n" );
        strcat( String, "» Ip: 93.114.82.66:7777\n" );
        strcat( String, "» Date Of Inauguration: 5.1.2011\n" );
        strcat( String, "» Slots: 60\n" );
        strcat( String, "» Version: GameSpeed v1.1\n" );
        strcat( String, "» Owners: RuSke & Tequila\n" );
        strcat( String, "» Scripter: RuSke\n" );
        strcat( String, "» Mapper: Tequila\n" );
        strcat( String, "» Forum: GameSpeed.funkiZone.Com\n" );
        strcat( String, "» Map: San Andreas\n" );
        ShowPlayerDialog( playerid, 1, 0, "{FF0000}Server InFo", String, "Ok", "" );
    }
    return 1;
}
Reply
#4

Multumesc dar la /stats cum fac ?

Code:
SendClientMessage(playerid, COLOR_GREEN,"___________________________________________________________________________________________________");
		format(coordsstring, sizeof(coordsstring),"» Name: %s • Level: %d • Faction: %s • Rank: %s",name,plevel,ttext,rtext);
		SendClientMessage(playerid, COLOR_LIGHTBLUE,coordsstring);
		format(coordsstring, sizeof(coordsstring), "» Sex: %s • Age: %d • SpawnHealth: %.1f • Cash: %s • Bank: %s • NumberPhone: %d", atext, age, shealth+50, FormatMoney(cash), FormatMoney(account), pnumber);
		SendClientMessage(playerid, COLOR_WHITE,coordsstring);
		format(coordsstring, sizeof(coordsstring), "» DonateRank: %s • PlayingHours: %d • Respect: %d/%d • NumberLotto: %d", drank,ptime,exp,expamount,lotto);
		SendClientMessage(playerid, COLOR_LIGHTBLUE,coordsstring);
		format(coordsstring, sizeof(coordsstring), "» TimesArrested: %d • WantedLevel: %d • MarriedTo: %s • Disease: %s", arrests,wanted,married,dtext);
		SendClientMessage(playerid, COLOR_WHITE,coordsstring);
		format(coordsstring, sizeof(coordsstring), "» Kills: %d • Deaths: %d • NextLevel: %d$ • Job: %s",kills,deaths,costlevel,jtext);
		SendClientMessage(playerid, COLOR_LIGHTBLUE,coordsstring);
		format(coordsstring, sizeof(coordsstring), "» FishesCaught: %d • BiggestFish: %d • Drugs: %d • Materials: %d • Pills: %d • Warns: %d",fishes,bigfish,drugs,mats,pills,warns);
		SendClientMessage(playerid, COLOR_WHITE,coordsstring);
		SendClientMessage(playerid, COLOR_GREEN,"___________________________________________________________________________________________________");
Reply
#5

că textul este bine. Ea nu are nevoie de strcat.
Ne pare rău, pentru limba mea rău, aceasta nu este limba mea principală.
Reply
#6

Quote:
Originally Posted by Dwane
View Post
că textul este bine. Ea nu are nevoie de strcat.
Ne pare rău, pentru limba mea rău, aceasta nu este limba mea principală.
Ok.
Dar la /help se poate face?

Code:
if(strcmp(cmd, "/help", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			SendClientMessage(playerid, COLOR_RED,"|___________________________________________[Help]_____________________________________|");
			SendClientMessage(playerid, COLOR_WHITE,"» Account: /stats /buylevel /upgrade /resetupgrades /©hange(s)pawn©ivil /leaders /helpers /admins");
			SendClientMessage(playerid, COLOR_WHITE,"» General: /pay /charity /time /buy /get /id /drink /showlicenses /robbing /ticketlist /animlist /swithkey");
			SendClientMessage(playerid, COLOR_WHITE,"» General: /buygun /skill /licenses /lotto /surrender /contract /factionlist /jobs /nr /glasses  /info /neon");
			SendClientMessage(playerid, COLOR_WHITE,"» General: /report /needhelp /accept /cancel /eject /usedrugs /usepills /fill /fillcar /service /fightstyle");
			SendClientMessage(playerid, COLOR_WHITE,"» Bank: /withdraw /bank /transfer /balance /credit /paycredit /infocredit");
	  		SendClientMessage(playerid, COLOR_WHITE,"» Married: /witness /propose /divorce");
			if (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
			{
				SendClientMessage(playerid, COLOR_WHITE, "» Police Departament: (/r)adio (/d)epartments (/m)egaphone (/su)spect /mdc /jail /duty /wanted /tazer /getincar /cuff");
				SendClientMessage(playerid, COLOR_WHITE, "» Police Departament: (/c)ell(s)witch /frisk /take /ticket /deliver /camera /ram (/j)ail(l)ist (/togr)adio (/togd)epartments");
				SendClientMessage(playerid, COLOR_WHITE, "» Police Departament: (/b)ac(k)up (/b)ac(k)up©lear /carcera /equip /swat /rbls /rbsf /rbon /rboff");
				SendClientMessage(playerid, COLOR_WHITE, "» Police Departament: /water /members /factionspawn");
			}
			if (PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
			{
				SendClientMessage(playerid, COLOR_WHITE, "» FBI: (/r)adio (/d)epartments (/m)egaphone (/su)spect /mdc /jail /wanted /tazer /getincar /cuff");
				SendClientMessage(playerid, COLOR_WHITE, "» FBI: /frisk /take /deliver /camera /ram (/j)ail(l)ist (/togr)adio (/togd)epartments");
				SendClientMessage(playerid, COLOR_WHITE, "» FBI: (/b)ac(k)up (/b)ac(k)up©lear /carcera /equip /undercover /showbadge");
				SendClientMessage(playerid, COLOR_WHITE, "» FBI: /water /members /factionspawn\n");
			}
			if (PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
			{
				SendClientMessage(playerid, COLOR_WHITE, "» National Guard: (/r)adio (/d)epartments (/m)egaphone (/su)spect /mdc /jail /wanted /tazer /getincar /cuff (/c)ell(s)witch");
				SendClientMessage(playerid, COLOR_WHITE, "» National Guard: /take /deliver /camera /ram (/j)ail(l)ist (/togr)adio (/togd)epartments (/b)ac(k)up (/b)ac(k)up©lear /carcera /equip");
				SendClientMessage(playerid, COLOR_WHITE, "» National Guard: /water /members /factionspawn");
			}
			if (PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)
			{
				SendClientMessage(playerid, COLOR_WHITE, "» Medic & Fireman: (/r)adio (/d)epartments /heal /get pills /sellpills /duty (/togr)adio (/togd(epartments) /water /members /factionspawn");
			}
			if (PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)
			{
				SendClientMessage(playerid, COLOR_WHITE, "» La Cosa Nostra: (/f)amily (/f)amily(a)lliance (/togf)amily /tie /untie /water /members /factionspawn");
			}
			if (PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)
			{
				SendClientMessage(playerid, COLOR_WHITE, "» Yakuza: (/f)amily (/f)amily(a)lliance (/togf)amily /tie /untie /water /members /factionspawn");
			}
			if (PlayerInfo[playerid][pMember] == 7 || PlayerInfo[playerid][pLeader] == 7)
			{
				SendClientMessage(playerid, COLOR_WHITE, "» Presedinte: -");
			}
			if (PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8)
			{
				SendClientMessage(playerid, COLOR_WHITE, "» Hitman Agency: (/f)amily (/togf)amily /portable /order /water /members /factionspawnn");
			}
            if (PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9)
			{
				SendClientMessage(playerid, COLOR_WHITE, "» Stirile ProTv: (/f)amily (/togf)amily /news /live /paper /water /members /factionspawn");
			}
            if (PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
			{
				SendClientMessage(playerid, COLOR_WHITE, "» Taxi Cab Company: (/f)amily (/togf)amily /fare /water /members /factionspawn");
			}
            if (PlayerInfo[playerid][pMember] == 11 || PlayerInfo[playerid][pLeader] == 11)
			{
				SendClientMessage(playerid, COLOR_WHITE, "» School Instructor: (/f)amily (/togf)amily /startlesson /stoplesson /givelicense /water /members /factionspawn");
			}
			if (PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12)
			{
				SendClientMessage(playerid, COLOR_WHITE, "» Bloods Gang: (/f)amily (/f)amily(a)lliance (/togf)amily /tie /untie /water /members /factionspawn");
			}
			if (PlayerInfo[playerid][pMember] == 13 || PlayerInfo[playerid][pLeader] == 13)
			{
				SendClientMessage(playerid, COLOR_WHITE, "» Crips Gang: (/f)amily (/f)amily(a)lliance (/togf)amily /tie /untie /water /members /factionspawn");
			}
			if (PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14)
			{
				SendClientMessage(playerid, COLOR_WHITE, "» Surenos Gang: (/f)amily (/f)amily(a)lliance (/togf)amily /tie /untie /water /members /factionspawn");
			}
			if (PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)
			{
                SendClientMessage(playerid, COLOR_WHITE,"» Nortenos Gang: (/f)amily (/f)amily(a)lliance (/togf)amily /tie /untie /water /members /factionspawn");
			}
            if(PlayerInfo[playerid][pJob] == 1) {
		    SendClientMessage(playerid,COLOR_GREY,"» Job Secondary Detective: /find"); }
		    else if(PlayerInfo[playerid][pJob] == 2) {
		    SendClientMessage(playerid,COLOR_GREY,"» Job Secondary Lawyer: /free"); }
		    else if(PlayerInfo[playerid][pJob] == 3) {
		    SendClientMessage(playerid,COLOR_GREY,"» Job Secondary Whore: /sex"); }
		    else if(PlayerInfo[playerid][pJob] == 4) {
		    SendClientMessage(playerid,COLOR_GREY,"» Job Secondary Drugs Dealer: /selldrugs /getdrugs /usedrugs"); }
		    else if(PlayerInfo[playerid][pJob] == 5) {
		    SendClientMessage(playerid,COLOR_GREY,"» Job Secondary Car Jacker: /dropcar"); }
		    else if(PlayerInfo[playerid][pJob] == 7) {
		    SendClientMessage(playerid,COLOR_GREY,"» Job Secondary Car Mechanic: /repair /refill /duty"); }
		    else if(PlayerInfo[playerid][pJob] == 8) {
		    SendClientMessage(playerid,COLOR_GREY,"» Job Secondary BodyGuard: /guard"); }
		    else if(PlayerInfo[playerid][pJob] == 9) {
		    SendClientMessage(playerid,COLOR_GREY,"» Job Secondary Arms Dealer: /materials /sellgun"); }
		    else if(PlayerInfo[playerid][pJob] == 10) {
		    SendClientMessage(playerid,COLOR_GREY,"» Job Secondary Car Dealer: /sellcar"); }
		    else if(PlayerInfo[playerid][pJob] == 12) {
		    SendClientMessage(playerid,COLOR_GREY,"» Job Secondary Boxer: /fight /boxstats"); }
		    else if(PlayerInfo[playerid][pJob] == 14) {
		    SendClientMessage(playerid,COLOR_GREY,"» Job Secondary Bus Driver: /fare"); }
		    else if(PlayerInfo[playerid][pJob] == 15) {
		    SendClientMessage(playerid,COLOR_GREY,"» Job Secondary Paper Boy: /papers /bring /deliver"); }
		    else if(PlayerInfo[playerid][pJob] == 16) {
		    SendClientMessage(playerid,COLOR_GREY,"» Job Secondary Trucker: /load /buyprods /sellprods"); }
			SendClientMessage(playerid, COLOR_WHITE,"» Other: /cellphonehelp /househelp /renthelp /businesshelp /fishhelp /cookhelp /irchelp");
			SendClientMessage(playerid, COLOR_GREY,"» Other: /(a)dmin(h)elp /(h)elper(h)elp /(l)eader(h)elp");
		}
		return 1;
	}
Reply
#7

ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,CO LOR_GREEN,"»Account: /stats /buylevel /upgrade /resetupgrades /©hange(s)paw©ivil /leaders /helpers /admins"); eu ceva ca asta am inteles..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)