Whats wrong here?
#1

Hey there,

I tried to make a little solving with this. I have made this command and it works, but only for one person. When he types it, he can see the message, but others cannot. I tried changing SendClientMessage to SendClientMessageToAll but I get errors Here is the command...

Код:
   if(strcmp(cmdtext, "/needbus", true) == 0) {
	   new pname[MAX_PLAYER_NAME];
     GetPlayerName(playerid, pname, sizeof (pname));
     format(stringw, sizeof(stringw), "*** %s [id: %d] needs a bus / potrzebuje autobus!", pname, giveplayerid);
     SendClientMessageToAll(playerid, COLOR_ADMIN, stringw); //
  return 1;}
...And errors...

Код:
C:\Users\PUZI\Desktop\RPG TDM (all versions) + SA TDM\RPG.pwn(3923) : error 035: argument type mismatch (argument 2)
C:\Users\PUZI\Desktop\RPG TDM (all versions) + SA TDM\RPG.pwn(4114) : warning 203: symbol is never used: "IsNumeric"
C:\Users\PUZI\Desktop\RPG TDM (all versions) + SA TDM\RPG.pwn(4114) : warning 203: symbol is never used: "ReturnUser"

Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
P.S - Don't worry about my warnings

Thanks And Regards
Puzi
Reply
#2

SendClientMessageToAll(playerid, COLOR_ADMIN, stringw);
"ToAll" "playerid" makes no sense, so ..
pawn Код:
SendClientMessageToAll(COLOR_ADMIN, stringw);
PS: use
pawn Код:
#pragma unused IsNumeric
#pragma unused ReturnUser
to prevent the warnings.
Reply
#3

How could SendClientMessageToAll be for a playerid..? Think before changing codes.
pawn Код:
SendClientMessageToAll(COLOR_ADMIN, stringw);
Reply
#4

Ah thank you very much guys
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)