[HELP] PMSpec Problem.
#1



CODE:
Код:
CMD:pm(playerid, params[]) {
if(PlayerData[playerid][ddGirdi] != 0) return HataMesaji(playerid, "Derby'de bu komutu kullanamazsın.");
	if(PlayerData[playerid][JailSure] > 0) return JailHatasi(playerid);
	if(PlayerData[playerid][dmGirdi] != 0) return HataMesaji(playerid, "DM'de bu komutu kullanamazsın.");
	if(PlayerData[playerid][eventGirdi] == 1) return HataMesaji(playerid, "Etkinlikte bu komutu kullanamazsın.");
	if(PlayerData[playerid][MuteSure] > 0) return MuteHatasi(playerid);
	new id, msg[128];
	if(sscanf(params, "us[128]", id, msg)) return HataMesaji(playerid, "Kullanım: /pm [id] [mesaj]");
	if(id == INVALID_PLAYER_ID) return HataMesaji(playerid, "Geзersiz ID.");
	if(id == playerid) return HataMesaji(playerid, "Kendine PM atamazsın.");
	if(PlayerData[playerid][PMKapali] == 1)  return HataMesaji(playerid, "PM yollamak iзin PM'nizi aзın.");
	if(PlayerData[id][PMKapali] == 1)  return HataMesaji(playerid, "Karşı taraf PM'ini kapatmış.");
	new string[128];
	format(string,sizeof(string),"[Gцnderilen] %s(%d): %s", PlayerName(id), id, msg);
	SendClientMessage(playerid, X11_YELLOW, string);
	format(string,sizeof(string),"[Gelen] %s(%d): %s", PlayerName(playerid), playerid, msg);
	SendClientMessage(id, X11_ORANGE, string);
	GameTextForPlayer(id, "~n~~n~~n~~n~~n~~y~Yeni Mesajiniz Var", 3000, 5);
     for(new i=0; i<MAX_PLAYERS; i++)
    {
    if(PlayerData[i][AdminLevel] >= 4 && PMSpec[i] == 1)
    {
    format(string, sizeof(string), "« {FF0000}PMSpec {FFFFFF}» {FF0000}%s(%i) »» %s(%i): %s", PlayerName(id), playerid, PlayerName(playerid), msg);
    SendClientMessage(i, -1, string);
}}
	return 1;
}
Reply
#2

What would be your problem? I do not understand.
Reply
#3

Код:
format(string, sizeof(string), "« {FF0000}PMSpec {FFFFFF}» {FF0000}%s(%i) »» %s(%i): %s", PlayerName(id), playerid, PlayerName(playerid), msg);
Except "msg", all the rest of the arguments have been incorrectly placed. It should be:
pawn Код:
// correct order:

Name of "playerid"
ID of "playerid"
Name of "id"
ID of "id"
msg
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)