Message problem... - 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: Message problem... (
/showthread.php?tid=133038)
Message problem... -
Xoop - 10.03.2010
Please help me with this:
pawn Код:
cmd(fare, playerid, params[])
{
if(IsPlayerConnected(playerid) && PlayerLoggedIn[playerid])
{
new fare;
new string[128];
new vehicle = GetPlayerVehicleID(playerid);
if(PlayerInfo[playerid][pJob] == 3)
{
if(IsTaxiCar(vehicle))
{
if(sscanf(params, "d",fare))
{
SendClientMessage(playerid, COLOR_HELP, "USAGE: /fare <amount>");
return 1;
}
if(fare < 10 || fare > 30)
{
SendClientMessage(playerid,COLOR_ERROR,"ERROR: The fare can't be less than $10 or higher than $30.");
return 1;
}
TransportValue[playerid] = fare;
format(string, strlen(string),"You have set your fare to %d$.",TransportValue[playerid]);
SendClientMessage(playerid,COLOR_INFO,string);
}
}
}
return 1;
}
The problem is that the message
You have set your fare to %d$. doesn't show up, it only displays a blank message with no text.
Please help me, thank you...
Re: Message problem... -
Desert - 10.03.2010
Try making the %d to %i
Re: Message problem... -
Xoop - 10.03.2010
Umm, it didn't help.. but thanks for trying.
Re: Message problem... -
deltaRPG - 10.03.2010
alo pomagajte mu treba mu hitno biti ce љamaranja jeste culi?
Re: Message problem... -
Xoop - 10.03.2010
Quote:
Originally Posted by KuraCCCCC
alo pomagajte mu treba mu hitno biti ce љamaranja jeste culi?
|
What ?
Re: Message problem... -
server_making - 10.03.2010
Check your include files ...
Re: Message problem... -
laser50 - 10.03.2010
Quote:
Originally Posted by Xoop
Umm, it didn't help.. but thanks for trying. 
|
try %s :P
as thats for strings.
Re: Message problem... -
Xoop - 10.03.2010
Quote:
Originally Posted by laser50
Quote:
Originally Posted by Xoop
Umm, it didn't help.. but thanks for trying. 
|
try %s :P
as thats for strings.
|
Im not puting in a string, im puting in an integer so it's %d or %i but neither of them work.
Re: Message problem... -
westre - 10.03.2010
Код:
format(string, sizeof(string),"You have set your fare to %d$.",TransportValue[playerid]);
Re: Message problem... -
Xoop - 10.03.2010
Thank you, it works.