Invalid Command [Help]
#1

I am a beginner PAWN coder and I am testing this CNR gamemode. All commands work except this one command called "/myinfo".

When you do /myinfo it will stop all other commands from working and state "SERVER: Unknown Command" instead each time you do commands that normally work.


How can I fix this? Code listed below for the /myinfo command

Код:
	if(strcmp(cmdtext, "/myinfo", true) == 0)
	{
		new string[250], string2[250], string3[250], string4[250], thename[MAX_PLAYER_NAME];
		GetPlayerName(playerid, thename, sizeof(thename));
		format(string, sizeof(string), "|_| %s |_|", thename);
		SendClientMessage(playerid, GRAY, string);
		if(GetPlayerAdminLevel(playerid) > 1) SendClientMessage(playerid, WHITE, "You are an Admin.");
		else SendClientMessage(playerid, WHITE, "You are not an Admin.");
		format(string2, sizeof(string2), "You have %d Warning(s).", GetPlayerWarnings(playerid));
		SendClientMessage(playerid, WHITE, string2);
		format(string3, sizeof(string3), "Wanted Level: %d", GetPlayerWantedLevel(playerid));
		SendClientMessage(playerid, WHITE, string3);
		if(HasHit[playerid] == 1) SendClientMessage(playerid, WHITE, "You have a Hit Contract on you.");
		else if(HasHit[playerid] == 0) SendClientMessage(playerid, WHITE, "You do not have any Hit Contracts on you.");
	    format(string4, sizeof(string4), "You carry %d C4 block(s) with you.", GetPlayerC4Amount(playerid));
	    SendClientMessage(playerid, WHITE, string4);
		return true;
	}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)