SA-MP Forums Archive
simple - 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)
+--- Thread: simple (/showthread.php?tid=605300)



simple - StR_MaRy - 17.04.2016

hi guys i did a command to see the house owner + house id + last login from the player but i want to do if the house is not owned to send me only the Owner like The State what already did and the house id without last login cause is no player to have a lastlogin

Код HTML:
CMD:house2(playerid, params[])
{
	new house;
	if(gLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_ERROR, "You are not logged in.");
	if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_ERROR, "Your admin level is not high enough to use this command.");
    if(PlayerInfo[playerid][pHouseKey] == 0) return SendClientMessage(playerid, COLOR_ERROR, "This house is not owned.");
	if(sscanf(params,"i",house)) return SendClientMessage(playerid, COLOR_SYN, "Synthax:{FFFFFF} /house <houseid>");
	{
	    if(strlen(HouseInfo[house][hOwner]) < 2) return SendClientMessage(playerid, COLOR_ERROR, "Invalid house id.");
		format(gString, sizeof(gString), "Owner: %s | House id: %d | Last Login: %s", HouseInfo[house][hOwner], house, PlayerInfo[playerid][pLastLogin]);
		SendClientMessage(playerid, COLOR_GRAD3, gString);
	}
	return 1;
}



Re: simple - StR_MaRy - 17.04.2016

fixed