/r command not working
#1

this is part of the command im working on every other faction can use it but ems and fire heres the code


Код:
		if(gteam[playerid] == Team_EMS || gteam[playerid] == Team_Fire){
			GetPlayerName(playerid, playername, sizeof(playername));
			format(string, sizeof(string), "(DPSCOM) EMS-%d: %s, over", playerid, cmdtext[3]);
			SendMessageToEMS(string);
and the SendMessageToEMS part

Код:
SendMessageToEMS(const str[])
{
for (new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i)) {
if (gteam[i]==Team_Fire || gteam[i]==Team_EMS) {
SendClientMessage(i, COLOR_RED, str);
}
}
}
}
if i use /r as ems like /r this is a test nothing shows as if it ant working and it only seems to be ems and fire
Reply
#2

try this

Код:
dcmd_r(playerid, params[])
{
	new text[256], name[60];
	if(sscanf(params, "s", text)) SendClientMessage(playerid, COLOR_WHITE, "USAGE: /r [text]");
	else
	{
	  new string[322];
	  GetPlayerName(playerid, name, 60);
	  format(string, 322, "(%s) (Radio): %s", name, text);
	  for(new i=0;i<MAX_PLAYER;i++)
	  {
	    if(IsPlayerConnected(i))
	    {
	    	if(gTeam[i] == gTeam[playerid])
	    	{
	    	  SendClientMessage(i, COLOR_GREEN, string);
				}
			}
		}
	}
	return 1;

}
Reply
#3

Bristan, Are you Using the ERP Script By Lt. Cain ( Un Released bout 10 ppl have it ) ?? If you are PM me and Ill b able to fix this for you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)