message does not show
#1

why does this not work?? it doesnt show anything.

in my include:
Код:
stock GetLevelInfo(playerid)
{
	new str[128];
	new PR = PInfo[playerid][Level];
	new weap[32];
	GetWeaponName(LevelInfo[PR][RSpawnWeapon], weap, 32);
	format(str, 128, "============================LevelInfo===============================");
	SendClientMessage(playerid, 0x7CFC00AA, str);
	format(str, 128, "Your Level: %d", PR, LevelInfo[PR][RName]);
	SendClientMessage(playerid, 0x7CFC00AA, str);
	format(str, 128, "StartMoney: $%d ** SpawnHealth: %.1f \% ** SpawnArmour: %.1f \%", LevelInfo[PR][RStartMoney], LevelInfo[PR][RSpawnHealth], LevelInfo[PR][RSpawnArmour]);
  SendClientMessage(playerid, 0xADFF2FAA, str);
  format(str, 128, "SpawnWeapon: %s (%d bullets)", weap, LevelInfo[PR][RSpawnAmmo]);
	SendClientMessage(playerid, 0xADFF2FAA, str);
	PR++;
	if(PromotionMode > 0)
	{
		if(PR < TotalLevels)
		{
			switch(PromotionMode)
			{
			  case 1: {format(str, 128, "Requirement to promote to next Level: %d online hours. Current you have played %d hours and %d minutes", LevelInfo[PR][RRequirement], PInfo[playerid][HoursPlayed], PInfo[playerid][MinutesPlayed]);}
				case 2: {format(str, 128, "Requirement to promote to next Level: %d kills. Current you have %d kills", LevelInfo[PR][RRequirement], PInfo[playerid][Kills]);}
		    case 3: {format(str, 128, "Requirement to promote to next Level: %d dollar cash. Current you have %d dollar", LevelInfo[PR][RRequirement], GetPlayerMoney(playerid));}
		    case 4: {format(str, 128, "Requirement to promote to next Level: %d visits to this server. Current you have %d visits", LevelInfo[PR][RRequirement], PInfo[playerid][Visits]);}
		    case 5: {format(str, 128, "Requirement to promote to next Level: A score of %d. Current your score is: %d", LevelInfo[PR][RRequirement], GetPlayerScore(playerid));}

		 	}
		}
		else
		{
		  format(str, 128, "You reached the highest level!");
		}
 		SendClientMessage(playerid, 0xADFF2FAA, str);
	}
 	format(str, 128, "======================================================================");
 	SendClientMessage(playerid, 0xADFF2FAA, str);
 	return 1;
}
in my gm:

Код:
	if(!strcmp("/levelinfo", cmdtext, true,10))
{
  GetLevelInfo(playerid);
  return 1;
}
Reply
#2

Correct me if i am wrong, but shouldnt it be
pawn Код:
if (strcmp(cmdtext, "/levelinfo", true)==0)
Reply
#3

for all my other commands it work, so the command is right
Reply
#4

Quote:
Originally Posted by Ritchie999
Correct me if i am wrong, but shouldnt it be
pawn Код:
if (strcmp(cmdtext, "/levelinfo", true)==0)
It's the same as his code:
pawn Код:
if(!strcmp("/levelinfo", cmdtext, true,10))
Notice the ! at the statement.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)