two little problems - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: two little problems (
/showthread.php?tid=197599)
two little problems -
pantelimonfl - 09.12.2010
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;
}
Re: two little problems -
Flo_White - 09.12.2010
is
pawn Код:
PlayerInfo[giveplayerid][pPnumber]
a string or a number?
if it's a number use %d instead of %s in the format line
Re: two little problems -
pantelimonfl - 09.12.2010
it worked. and the 2nd problem?
Re: two little problems -
case 1337: - 09.12.2010
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.