07.07.2015, 14:04
How come such a simple command fails to function?
Tried these out;
They all do the same, see pic;
Got no filter scripts.
Tried these out;
Code:
CMD:b(playerid, params[]) { new textstr[130]; if(sscanf(params, "s[130]", textstr)) { new msg[128], msg2[128]; format(msg, sizeof(msg), "(( %s [%i]: %s ))", PlayerRPName(playerid), playerid, params); ProxDetector(5.0, playerid, msg, COLOR_WHITE, COLOR_GRAD1, COLOR_GRAD2, COLOR_GRAD3, COLOR_GRAD4); format(msg2, sizeof(msg2), "[low]: %s", params); SetPlayerChatBubble(playerid, msg2, COLOR_WHITE, 5.0, 10000); } else return SendUsageMessage("/b [msg]"); return 1; }
Code:
CMD:b(playerid, params[]) { new textstr[130]; if(isnull(params)) return SendUsageMessage("/b [msg]"); new msg[128], msg2[128]; format(msg, sizeof(msg), "(( %s [%i]: %s ))", PlayerRPName(playerid), playerid, params); ProxDetector(5.0, playerid, msg, COLOR_WHITE, COLOR_GRAD1, COLOR_GRAD2, COLOR_GRAD3, COLOR_GRAD4); format(msg2, sizeof(msg2), "[low]: %s", params); SetPlayerChatBubble(playerid, msg2, COLOR_WHITE, 5.0, 10000); return 1; }
Code:
CMD:b(playerid, params[]) { new textstr[130]; if(isnull(params)) return SendUsageMessage("/b [msg]"); format(textstr, sizeof(textstr), "(( %s [%i]: %s ))", PlayerRPName(playerid), playerid, params); ProxDetector(5.0, playerid, textstr, COLOR_WHITE, COLOR_GRAD1, COLOR_GRAD2, COLOR_GRAD3, COLOR_GRAD4); format(textstr, sizeof(textstr), "[low]: %s", params); SetPlayerChatBubble(playerid, textstr, COLOR_WHITE, 5.0, 10000); return 1; }
Code:
public OnPlayerCommandPerformed(playerid, cmdtext[], success) { if(gPlayerLogged[playerid] == 0) return SendErrorPrefix(playerid, "You must be logged in before you can use any command!"); if(!success) { new erstr[130]; format(erstr, sizeof(erstr), "{FFFFFF}[{FF6347}ERROR{FFFFFF}]{FF6347} '%s' has not been found in our database, please use /help.", cmdtext); return SendClientMessage(playerid, COLOR_LIGHTRED, erstr); } printf("[cmd] [%s] %s", PlayerRPName(playerid), cmdtext); return 1; }
Code:
public OnPlayerCommandText(playerid, cmdtext[]) { return 1; }