24.05.2015, 09:58
Quote:
Код HTML:
CMD:editbtext(playerid, params[]) { new idx,string[128],text[128]; if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Tqven unda shexvidet tqven eqauntze rom gamoiyenot commandebi."); if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid, COLOR_GREY, "Tqven Ar Xart an authorized to use this command."); //if(!aDuty[playerid]) return SendClientMessage(playerid, COLOR_GREY, "Tqven Ar Xart Admin Dutyze."); if(!sscanf(params, "is[128]", idx, text)) return SendClientMessage(playerid, COLOR_RED, "{00C0FF}Minishneba:{FFFFFF} /editbtext [boardid] [text]"); if(!BoardInfo[idx][bModel]) return SendClientMessage(playerid, COLOR_GREY, "Invalid board id."); format(BoardInfo[idx][bTextM],sizeof(text),"{2641FE}%s",text); SetDynamicObjectMaterialText(BoardInfo[idx][bBoard],0,BoardInfo[idx][bTextM],OBJECT_MATERIAL_SIZE_256x128,"Arial",BoardInfo[idx][bFontSiz],1,0x000000FF,0xFFFFFFFF,OBJECT_MATERIAL_TEXT_ALIGN_CENTER); format(string,256,"You set board id %d text To: %s",idx,BoardInfo[idx][bTextM]); SendClientMessage(playerid,COLOR_ALIREZA,string); SaveBoards(); return 1; } |
PHP код:
CMD:editbtext(playerid, params[])
{
new idx,string[128],text[128];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Tqven unda shexvidet tqven eqauntze rom gamoiyenot commandebi.");
if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage(playerid, COLOR_GREY, "Tqven Ar Xart an authorized to use this command.");
//if(!aDuty[playerid]) return SendClientMessage(playerid, COLOR_GREY, "Tqven Ar Xart Admin Dutyze.");
if(sscanf(params, "is[128]", idx, text)) return SendClientMessage(playerid, COLOR_RED, "{00C0FF}Minishneba:{FFFFFF} /editbtext [boardid] [text]");
if(!BoardInfo[idx][bModel]) return SendClientMessage(playerid, COLOR_GREY, "Invalid board id.");
format(BoardInfo[idx][bTextM],sizeof(text),"{2641FE}%s",text);
SetDynamicObjectMaterialText(BoardInfo[idx][bBoard],0,BoardInfo[idx][bTextM],OBJECT_MATERIAL_SIZE_256x128,"Arial",BoardInfo[idx][bFontSiz],1,0x000000FF,0xFFFFFFFF,OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
format(string,256,"You set board id %d text To: %s",idx,BoardInfo[idx][bTextM]);
SendClientMessage(playerid,COLOR_ALIREZA,string);
SaveBoards();
return 1;
}