dcmd_fare(playerid,params[]) { new price2,pmodelid = GetVehicleModel(GetPlayerVehicleID(playerid)); if(gTeam[playerid] != TEAM_DRIVER) return SendClientMessage(playerid,red,"ERROR: "lgrey"You aren't a "lyellow2"taxi driver"lgrey"!"); if(PInfo[playerid][onduty] == 1) return SendClientMessage(playerid, red,"ERROR: "lyellow2"You're already on duty, please leave your car!"); if(sscanf(params,"i",price2)) return SendClientMessage(playerid,red,"USAGE: "lgrey"/fare "lyellow2"[cost]") && SendClientMessage(playerid,red,""lblue"FUNCTION: "lgrey"This will set a price for each 10 seconds a player is in your taxi!"); if(!IsTaxi(playerid,pmodelid)) return SendClientMessage(playerid,red,"ERROR:"lgrey"You must be in a "lyellow2"taxi"lgrey"!"); if(price2 > 500) return SendClientMessage(playerid,red,""lwhite"*"lred"That's to much for 10 seconds!"lwhite"*"); PInfo[playerid][fare2] = price2; PInfo[playerid][onduty] = 1; SendFMessageToAll(green,""lgreen"» Driver "lyellow2"%s(ID:%i) "lgreen"is now on duty! Fare: "lorange"%i "lgreen"per "lorange"10 seconds"lgreen"!",GetPName(playerid),playerid,price2); return 1; } dcmd_announce(playerid,params[]) { new text[128],string[128]; if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,red,error); if(sscanf(params,"s[128]",text)) return SendClientMessage(playerid,green2,"USAGE: "lyellow2"/announce <message>"); format(string,sizeof(string),"~w~%s",text); GameTextForAll(string,4000,3); return 1; }
dcmd_announce(playerid,params[])
{
new text[128],string[128];
if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,red,error);
if(sscanf(params,"s[128]",text)) return SendClientMessage(playerid,green2,"USAGE: "lyellow2"/announce <message>");
format(string,sizeof(string),"%s announced: %s",text);
SendClientMessageToAll(playerid, string);
GameTextForAll(string,4000,3);
return 1;
}
dcmd_announce(playerid,params[])
{
new text[128],string[128];
if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,red,error);
if(sscanf(params,"s[128]",text)) return SendClientMessage(playerid,green2,"USAGE: "lyellow2"/announce <message>");
format(string,sizeof(string),"%s announced: %s",text);
SendClientMessageToAll(-1, string);
GameTextForAll(string,4000,3);
return 1;
}
Added SendMessageToAll, see if that works.
pawn Код:
|
dcmd_announce(playerid,params[])
{
new text[128],string[128];
if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,red,error);
if(sscanf(params,"s",text)) return SendClientMessage(playerid,green2,"USAGE: "lyellow2"/announce <message>");
format(string,sizeof(string),"~w~%s",text);
GameTextForAll(string,4000,3);
return 1;
}
dcmd_announce(playerid,params[])
{
new string[128];
if(PInfo[playerid][Level] < 3) return SendClientMessage(playerid,red,"ERROR!");
if(sscanf(params, "s", string)) return SendClientMessage(playerid, COLOR_WHITE, "[USAGE]:/announce [text]");
format(string, sizeof(string), "~w~%s", string);
GameTextForAll(string, 4000, 3);
return 1;
}
i see no problem at command announce, the only thing would cause the message its your level in game. Try check which rank you're in game and compare to this one. if you're under level 3 it will display the message.
|