two little problems
#1

I edited the "/mdc" cmd to show the age and the phone number. At the compile, it doesn't show any error but in the game it doesn't work.


Код:
format(string, sizeof(string), "Varsta : %s", PlayerInfo[giveplayerid][pAge]);
						SendClientMessage(playerid, COLOR_GRAD2,string);
						format(string, sizeof(string), "Phone : %s", PlayerInfo[giveplayerid][pPnumber]);
						SendClientMessage(playerid, COLOR_GRAD2,string)
						
	}
I took the eXtr1ke's include for showing the ChatColor and it doesn't work. I added #include <ChatColor> and i edited the realchat.
Код:
if (realchat)
	{
	    if(gPlayerLogged[playerid] == 0)
	    {
	        return 0;
      	}
		GetPlayerName(playerid, sendername, sizeof(sendername));
		format(string, sizeof(string), "%s", text);
	    ChatColor(20.0, playerid,string);
		return 0;
	}
Reply
#2

is
pawn Код:
PlayerInfo[giveplayerid][pPnumber]
a string or a number?
if it's a number use %d instead of %s in the format line
Reply
#3

it worked. and the 2nd problem?
Reply
#4

pawn Код:
format(string, sizeof(string), "Varsta : %d", PlayerInfo[giveplayerid][pAge]);
    SendClientMessage(playerid, COLOR_GRAD2,string);
    format(string, sizeof(string), "Phone : %d", PlayerInfo[giveplayerid][pPnumber]);
    SendClientMessage(playerid, COLOR_GRAD2,string)
Tested, and works fine.

Enjoy.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)