in game type command saying that unknown command
#7

Quote:
Originally Posted by Calisthenics
Посмотреть сообщение
Код:
HouseInfo[PlayerInfo[playerid][pPhousekey]][hGLUpgrade]
HouseInfo[PlayerInfo[playerid][pPhousekey2]][hGLUpgrade]
Run time error 4. Check if player has a key before using it in array.
what you saying about this?

Код:
CMD:myupgrades(playerid, params[])
{
	if(gPlayerLogged{playerid} == 0) return SendClientMessage(playerid, COLOR_WHITE,"You need to login before using commands");
	new string[256], Float:spawmarm = PlayerInfo[playerid][pSHealth], gunloc1 = HouseInfo[PlayerInfo[playerid][pPhousekey]][hGLUpgrade], gunloc2 = HouseInfo[PlayerInfo[playerid][pPhousekey2]][hGLUpgrade];
	if(PlayerInfo[playerid][pPhousekey] != 0 && PlayerInfo[playerid][pPhousekey2] != 0)
	{
		format(string, sizeof(string), "_____ %s's upgrades (%d upgrade points available) _____", RemoveUnderScore(playerid),PlayerInfo[playerid][gPupgrade]);
		SendClientMessage(playerid, COLOR_LIMITLESSBLUE,string);
		format(string, sizeof(string), "{FFFF00}[Spawn Armour: %.2f/50] {9c9c9c}you spawn with '{FFFF00}%.2f{9c9c9c}' armour at the hospital after death.", PlayerInfo[playerid][pSHealth],spawmarm);
		SendClientMessage(playerid, COLOR_WHITE,string);
		format(string, sizeof(string), "{FFFF00}[House 1 Gun Lockers: %d/4] {9c9c9c}your first house have '{FFFF00}%d{9c9c9c}' guns lockers.", HouseInfo[PlayerInfo[playerid][pPhousekey]][hGLUpgrade],gunloc1);
		SendClientMessage(playerid, COLOR_WHITE,string);
		format(string, sizeof(string), "{FFFF00}[House 2 Gun Lockers: %d/4] {9c9c9c}your second house have '{FFFF00}%d{9c9c9c}' guns lockers.", HouseInfo[PlayerInfo[playerid][pPhousekey2]][hGLUpgrade],gunloc2);
		SendClientMessage(playerid, COLOR_WHITE,string);
	}
	else
	{
		format(string, sizeof(string), "_____ %s's upgrades (%d upgrade points available) _____", RemoveUnderScore(playerid),PlayerInfo[playerid][gPupgrade]);
		SendClientMessage(playerid, COLOR_LIMITLESSBLUE,string);
		format(string, sizeof(string), "{FFFF00}[Spawn Armour: %.2f/50] {9c9c9c}you spawn with '{FFFF00}%.2f{9c9c9c}' armour at the hospital after death.", PlayerInfo[playerid][pSHealth],spawmarm);
		SendClientMessage(playerid, COLOR_WHITE,string);
		SendClientMessage(playerid, COLOR_WHITE,"{FFFF00}[House 1 Gun Lockers: 0/4] {9c9c9c}your first house have '{FFFF00}0{9c9c9c}' guns lockers.");
		SendClientMessage(playerid, COLOR_WHITE,"{FFFF00}[House 2 Gun Lockers: 0/4] {9c9c9c}your second house have '{FFFF00}0{9c9c9c}' guns lockers.");
	}
return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)