Help With getting name
#1

Код:
CMD:explode(playerid,params[])
{
			if(pInfo[playerid][Adminlevel] < 5) return SendClientMessage(playerid, COLOR_RED, ""ERROR_MESSAGE"");
		    new TargetID, reason[20];
		    new targetname[MAX_PLAYER_NAME];
        	GetPlayerName(TargetID, targetname, sizeof(targetname));
		    if(sscanf(params, "us", TargetID, reason)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /explode [id] [reason]");
		    if(TargetID == INVALID_PLAYER_ID || !IsPlayerConnected(TargetID )) return SendClientMessage(playerid, COLOR_RED, "* Player Is Not Connected.");
	    	new string[300], srting1[128];
			new Float:burnx, Float:burny, Float:burnz; GetPlayerPos(TargetID,burnx, burny, burnz); CreateExplosion(burnx, burny , burnz, 7,10.0);
			format(string,sizeof(string),"** EXPLODE: %s (%d) (ADMIN EXPLODE) Has Been EXPLODED By An Admin. (Reason: %s)", targetname,TargetID,reason);
			SendClientMessageToAll(COLOR_HOTPINK,string);
			format(srting1,sizeof(srting1),"You have exploded %s (%d)", targetname,TargetID);
			SendClientMessage(playerid,COLOR_HOTPINK,srting1);
			return 1;
}
when i use it , it says the name of someone else but id is fine
Reply


Messages In This Thread
Help With getting name - by AroseKhanNiazi - 30.03.2014, 05:51
Re: Help With getting name - by electrux - 30.03.2014, 05:59
Re: Help With getting name - by AroseKhanNiazi - 30.03.2014, 07:51

Forum Jump:


Users browsing this thread: 1 Guest(s)