[HELP] Whats wrong with this?
#1

Код:
CMD:pm(playerid, params[]) {
    AddUsedCommand(playerid, "pm");
	new string[128];
	if(sscanf(params, "ds", player1, temp)) return SendUsageError(playerid, "/pm [playerid] [message]");
	if(!IsPlayerConnected(player1)) return SendCommandError(playerid, 0); // player isnt connected
	if(player1 == playerid) return SendErrorMessage(playerid, "You can't send msg to urself");
    format(string, sizeof(string), ""_green"» "_yellow"%s [%d]"_green": "_white"%s", PlayerName(player1), player1, temp);
	SendClientMessage(playerid, -1, string);
    format(string, sizeof(string), ""_blue"« "_yellow"%s [%d]"_blue": "_white"%s", PlayerName(playerid), playerid, temp);
	SendClientMessage(player1, -1, string);
	PlayerPlaySound(player1, 1085, 0.0, 0.0, 0.0);
    if(ServerInfo[ReadPMs] == 1) {
		format(string, sizeof(string), ""_white"PM: "_yellow"%s to %s: "_white"%s", PlayerName(playerid), PlayerName(player1), temp);
		MessageToAdmins(string);
		format(string, sizeof(string), "%s to %s: %s", PlayerName(playerid), PlayerName(player1), temp);
		SaveLog("PM", string);
	}
	return 1;
}
Whats whong with this cmd?
Its always return 'that player isnt connected' (I use the code form of sscanf, so don't post "params, "ds[128]", player1, temp"
Reply


Messages In This Thread
[HELP] Whats wrong with this? - by NeTuddMeg - 25.03.2012, 12:03
Re: [HELP] Whats wrong with this? - by Calgon - 25.03.2012, 12:22
Re: [HELP] Whats wrong with this? - by NeTuddMeg - 25.03.2012, 15:29

Forum Jump:


Users browsing this thread: 1 Guest(s)