10.03.2010, 18:48
Please help me with this:
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...
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;
}
Please help me, thank you...