SA-MP Forums Archive
convert - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: convert (/showthread.php?tid=162691)



convert - gedas_lt - 24.07.2010

How to fix this command convert
Код:
dcmd_createhouse(playerid,params[]) {
	#pragma unused params
	if(IsPlayerConnected(playerid)){
		//if(PlayerInfo[playerid][pAdmin] < 10) return SendClientMessage(playerid,COLOR_WHITE,"SERVER: Unknown command.");
		if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_WHITE, "Only admins allowed to use this command");
		new Sell, lvl;
		if(sscanf(params, "ii", Sell, lvl)) return SendClientMessage(playerid, COLOR_WHITE, "[USAGE]: /createhouse [sellprice] [HouseLvl]");
		if(Sell < 0 || Sell > 5000000) return SendClientMessage(playerid, COLOR_WHITE, "You cannot set the sell price below 0 or above 5 Mill");
		if(lvl < 0 || lvl > 12) return SendClientMessage(playerid, COLOR_WHITE, "You cannot create a house lvl that is below 0 or above 12");
		CreatePlayerHouse(playerid, Sell, lvl); }
	return true;
}
And this command don't work:
Код:
if(strcmp(cmdtext, "/nkurti", true)==0)
{
	#pragma unused params
	if(IsPlayerConnected(playerid)){
		//if(PlayerInfo[playerid][pAdmin] < 10) return SendClientMessage(playerid,COLOR_WHITE,"SERVER: Unknown command.");
		if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_WHITE, "Only admins allowed to use this command");
		new Sell, lvl;
		if(sscanf(params, "ii", Sell, lvl)) return SendClientMessage(playerid, COLOR_WHITE, "[USAGE]: /createhouse [sellprice] [HouseLvl]");
		if(Sell < 0 || Sell > 5000000) return SendClientMessage(playerid, COLOR_WHITE, "You cannot set the sell price below 0 or above 5 Mill");
		if(lvl < 0 || lvl > 12) return SendClientMessage(playerid, COLOR_WHITE, "You cannot create a house lvl that is below 0 or above 12");
		CreatePlayerHouse(playerid, Sell, lvl); }
	return true;
}