Again a little problem
#1

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?
Reply
#2

Anyone?

Some line must be missing or what..
Reply
#3

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

Код:
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"
Reply
#5

Код:
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;
}
Reply
#6

Still the same errors
Reply
#7

Forget them, It works
Reply
#8

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


Forum Jump:


Users browsing this thread: 2 Guest(s)