IDK what to do at this point.
#1

I have the CMD.
Код:
if(strcmp(cmd, "/walkietalkie", true) == 0 || strcmp(cmd, "/wt", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new freq = PlayerInfo[playerid][pWalkieFreq];
			new length = strlen(cmdtext);
			if(PlayerInfo[playerid][pWalkieFreq] == 0)
			{
        SendClientMessage(playerid, COLOR_GRAD2, " You must set your frequence first");
				return 1;
			}
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[256];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /wt [Message]");
				return 1;
			}
			if(PlayerInfo[playerid][pWalkie] == 1)
			{
				format(string, sizeof(string), "** Walkie Talkie Chat[%d] %s: %s **",freq, sendername, result);
				SendWalkieTalkieChatMessage(freq,COLOR_YELLOW, string);
        printf("%s", string);
				if(MedicBill[playerid] == 0)
				{
					new time = idx * 100;
					SetTimerEx("ClearChat",time,0,"d",playerid);
				}
				return 1;
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD2, " You must have a WalkieTalkie!");
				return 1;
			}
		}
		return 1;
	}
The function SendWalkieTalkieChatMessage is not implemented.I have it at forward.
Код:
forward SendWalkieTalkieChatMessage(freq, color, string[]);
Was not made by me,a friend send it to me via yahoo,but he doesn't know what to do either.
Thanks and have a nice day/night
Reply
#2

You still have to declare the function elsewhere. Post the function.
Reply
#3

Where somewhere else? Usually I declare it just at the forwards.Where should I declare it again?
Reply
#4

Yes, you need to forward public functions but you also have to put the actual function in there.

pawn Код:
forward ExitServer();

public ExitServer()
{
   SendRconCommand("exit");
   return 1;
}
//Just an example of a public function.
You only have the forward part. You need the actual function.
Reply
#5

Ok thanks a lot ^^
Reply
#6

No prob.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)