SA-MP Forums Archive
Again a little problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Again a little problem (/showthread.php?tid=94736)



Again a little problem - Striker_Moe - 31.08.2009

Hey

Код:
	if(strcmp(cmd, "/aduty on", true) == 0) 
	{
	 	if (AccountInfo[playerid][AdminLevel] > 1 || IsPlayerAdmin(playerid))
	 	{
			format(string, sizeof(string), "-| Administrator %s is now on admin duty. |-", sendername);
			SendClientMessageToAll(ORANGE, string);
	  	SetPlayerHealth(playerid,999999999); // max HP
	  	SetPlayerSkin(playerid, 272);
	  	SetPlayerColor(playerid, 0xF97804FF);
	  	Drugs[playerid] = 1;
	  	SendClientMessage(playerid, GREEN, "Admin duty ENABLED");
	 	}
	 	else SendClientMessage(playerid, RED, "Not for you, Sir");
		return 1;
	}
Thats my command for now, but the administratorґs name doesnt want to show up.. whereґs the problem?


Re: Again a little problem - Striker_Moe - 31.08.2009

Anyone?

Some line must be missing or what..


Re: Again a little problem - Jefff - 31.08.2009

Код:
new sendername[24];
GetPlayerName(playerid,sendername,24);



Re: Again a little problem - Striker_Moe - 31.08.2009

Код:
C:\Dokumente und Einstellungen\Moritz\Desktop\WW3\admin.pwn(686) : warning 219: local variable "sendername" shadows a variable at a preceding level
C:\Dokumente und Einstellungen\Moritz\Desktop\WW3\admin.pwn(810) : warning 219: local variable "sendername" shadows a variable at a preceding level
C:\Dokumente und Einstellungen\Moritz\Desktop\WW3\admin.pwn(3347) : warning 203: symbol is never used: "sendername"



Re: Again a little problem - Jefff - 31.08.2009

Код:
if(strcmp(cmdtext, "/aduty on", true) == 0)
{
	if (AccountInfo[playerid][AdminLevel] > 1 || IsPlayerAdmin(playerid))
	{
		GetPlayerName(playerid,sendername,24);
		format(string, sizeof(string), "-| Administrator %s is now on admin duty. |-", sendername);
		SendClientMessageToAll(ORANGE, string);
		SetPlayerHealth(playerid,999999999); // max HP
		SetPlayerSkin(playerid, 272);
		SetPlayerColor(playerid, 0xF97804FF);
		Drugs[playerid] = 1;
		SendClientMessage(playerid, GREEN, "Admin duty ENABLED");
	}
	else SendClientMessage(playerid, RED, "Not for you, Sir");
	return 1;
}



Re: Again a little problem - Striker_Moe - 31.08.2009

Still the same errors


Re: Again a little problem - Striker_Moe - 31.08.2009

Forget them, It works


Re: Again a little problem - Correlli - 31.08.2009

Quote:
Originally Posted by Mo3
Forget them, It works
And use an "Modify" button next time.