#1

error 035: argument type mismatch (argument 2)

Код:
CMD:call911(playerid,params[]) {
new string[128];
new dname[MAX_PLAYER_NAME], sw[120];
GetPlayerName(playerid, dname, sizeof(dname));
format(sw, sizeof(sw),"{3399FF}[Central Police Station] {FFFFFF}Thanks for calling 911, you will soon be served by a police officer, please wait.",dname);
SendClientMessage(blue2,sw);
format(string,sizeof(string),"{0985FA}[Police Central] {FFFFFF}Attention {3399FF}%s {FFFFFF}is calling 911, any officer available to answer the call.",dname,playerid,params);
MessageToAdmins(COLOR_WHITE,string);
return 1;
}
line :
Код:
SendClientMessage(blue2,sw);
why error?
Reply
#2

You forgot to define the playerid in sending the message to the player!
Just replace:
PHP код:
SendClientMessage(blue2,sw); 
to
PHP код:
SendClientMessage(playeridblue2,sw); 
Reply
#3

Quote:
Originally Posted by Lokii
Посмотреть сообщение
I think your looking for this function:

PHP код:
SendClientMessageToAll(blue2sw); 
No, that's not what he's looking for, as that would be stupid to broadcast to everyone a message that's only supposed to be shown to the cop faction...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)