CMD:hname(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 1338 && PlayerInfo[playerid][pHouseModerator] == 1)
{
SendClientMessageEx(playerid, COLOR_GRAD2, "You are not authorized to use that command.");
return 1;
}
new string[128], houseid, ownername[24];
if(sscanf(params, "ds[24]", houseid, ownername)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /hname [houseid] [name]");
format(HouseInfo[houseid][hOwnerName], 24, "%s", ownername);
format(string, sizeof(string), "You have set the house owner to %s", ownername);
HouseInfo[houseid][hOwned] = 1;
SendClientMessageEx(playerid, COLOR_WHITE, string);
ReloadHouseText(houseid);
SaveHouse(houseid);
format(string, sizeof(string), "%s has edited HouseID %d's Owner to %s.", GetPlayerNameEx(playerid), houseid, ownername);
Log("logs/hedit.log", string);
return 1;
}
CMD:hname(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 1338 && PlayerInfo[playerid][pHouseModerator] != 1)
{
SendClientMessageEx(playerid, COLOR_GRAD2, "You are not authorized to use that command.");
return 1;
}
new string[128], houseid, ownername[24];
if(sscanf(params, "ds[24]", houseid, ownername)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /hname [houseid] [name]");
format(HouseInfo[houseid][hOwnerName], 24, "%s", ownername);
format(string, sizeof(string), "You have set the house owner to %s", ownername);
HouseInfo[houseid][hOwned] = 1;
SendClientMessageEx(playerid, COLOR_WHITE, string);
ReloadHouseText(houseid);
SaveHouse(houseid);
format(string, sizeof(string), "%s has edited HouseID %d's Owner to %s.", GetPlayerNameEx(playerid), houseid, ownername);
Log("logs/hedit.log", string);
return 1;
}
if(PlayerInfo[playerid][pAdmin] < 1338 || PlayerInfo[playerid][pHouseModerator] != 1) return SendClientMessageEx(playerid, COLOR_GRAD2, "You are not authorized to use that command.");
PHP код:
|
CMD:hname(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] >= 1338 || PlayerInfo[playerid][pHouseModerator] == 1) { SendClientMessageEx(playerid, COLOR_GRAD2, "You are not authorized to use that command."); return 1; } new string[128], houseid, ownername[24]; if(sscanf(params, "ds[24]", houseid, ownername)) return SendClientMessageEx(playerid, COLOR_GREY, "USAGE: /hname [houseid] [name]"); format(HouseInfo[houseid][hOwnerName], 24, "%s", ownername); format(string, sizeof(string), "You have set the house owner to %s", ownername); HouseInfo[houseid][hOwned] = 1; SendClientMessageEx(playerid, COLOR_WHITE, string); ReloadHouseText(houseid); SaveHouse(houseid); format(string, sizeof(string), "%s has edited HouseID %d's Owner to %s.", GetPlayerNameEx(playerid), houseid, ownername); Log("logs/hedit.log", string); return 1; }