14.02.2013, 18:28
Okay, can I make like a function instead of adding the whole code all the time?
Код:
CMD:low(playerid,params[]) { new string[256], action[128], act[128], act2[128]; if(sscanf(params,"s[256]",action)) return SyntaxMSG(playerid, "/low [low chat]"); if(strlen(action) > 90) { strmid(act, action, 0, 90); strmid(act2, action, 90, 128); format(string,sizeof(string), "%s says [low]: %s...", GetNameWithMask(playerid), act); ProxDetectorV(3.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); format(string, sizeof(string), "...%s", act2); ProxDetectorV(3.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); } else { format(string,sizeof(string), "%s says [low]: %s", GetNameWithMask(playerid), action); ProxDetectorV(3.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5); } return 1; }