24.07.2010, 11:41
How to fix this command convert
And this command don't work:
Код:
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;
}
Код:
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;
}

