BaDB0y95 Posted May 29, 2021 Report Share Posted May 29, 2021 Tin sa mentionez ca acest server la coamnda /factions unde apar lideri aparea si statusul pentru aplicatie daca se poate aplica closed sau open si o pot modifica doar din mysql nu am comanda am incercat sa fac unu sa modific din joc dar nu reusesc ce am gresit CMD:status(playerid, params []) { if(pInfo[playerid][pRank] < 6 || pInfo[playerid][pMember] == 13) return SendClientMessage(playerid, COLOR_DARKGRAY, "You not have minimum rank 6."); new motd[90]; if(sscanf(params, "s[90]", motd)) return SendClientMessage(playerid, 0x8EC7DCFF, "Syntax: {FFFFFF}/status [MOTD Text]"); if(strlen(motd) > 89) return SendClientMessage(playerid, COLOR_DARKGRAY, "Maximum characters allowed for status is 90."); if(!IsValidMOTD(motd)) return SendClientMessage(playerid, COLOR_DARKGRAY, "Invalid characters, valid characters are: A-Z, a-z, 0-9, (. , : ! ?)."); mysql_tquery(MySQLCon, "SELECT option_value FROM `inf_options` WHERE `option_name`='factionAppStatus1' OR `option_name`='factionAppStatus2' OR `option_name`='factionAppStatus3' OR `option_name`='factionAppStatus4'OR `option_name`='factionAppStatus5'OR `option_name`='factionAppStatus6'OR `option_name`='factionAppStatus7'OR `option_name`='factionAppStatus8'OR `option_name`='factionAppStatus9'OR `option_name`='factionAppStatus10'OR `option_name`='factionAppStatus11'OR `option_name`='factionAppStatus12'OR `option_name`='factionAppStatus14'OR `option_name`='factionAppStatus15'OR `option_name`='factionAppStatus16'OR `option_name`='factionAppStatus17'OR `option_name`='factionAppStatus18'OR `option_name`='factionAppStatus19'", "OnFUP", ""); format(stringf[pInfo[playerid][pMember]-1], 100, "Faction MOTD: {FFFFFF}%s", motd), SendClientMessage(playerid, 0xA9C4E4FF, stringf[pInfo[playerid][pMember]-1]); return 1; } daca scriam 0 trebuia sa se modifice in baza de date si sa nu mai poti aplica si daca pui 1 sa poti aplica! Quote Discord: BaDB0y#3017 Link to comment Share on other sites More sharing options...
BaDB0y95 Posted June 6, 2021 Author Report Share Posted June 6, 2021 Ma poate ajuta cineva? Quote Discord: BaDB0y#3017 Link to comment Share on other sites More sharing options...
Hackeru Suprem Posted November 1, 2023 Report Share Posted November 1, 2023 CMD:status(playerid, params[]) { if (pInfo[playerid][pRank] < 6 || pInfo[playerid][pMember] == 13) { return SendClientMessage(playerid, COLOR_DARKGRAY, "You do not have the minimum rank of 6."); } new motd[90]; if (sscanf(params, "s[90]", motd)) { return SendClientMessage(playerid, 0x8EC7DCFF, "Syntax: {FFFFFF}/status [MOTD Text]"); } if (strlen(motd) > 90) { return SendClientMessage(playerid, COLOR_DARKGRAY, "Maximum characters allowed for status is 90."); } if (!IsValidMOTD(motd)) { return SendClientMessage(playerid, COLOR_DARKGRAY, "Invalid characters, valid characters are: A-Z, a-z, 0-9, (. , : ! ?)."); } new query[200]; mysql_format(query, sizeof(query), "UPDATE inf_options SET option_value = '%s' WHERE option_name = 'factionAppStatus%d'", motd, pInfo[playerid][pMember]); mysql_tquery(MySQLCon, query, "OnFUP", ""); format(stringf[pInfo[playerid][pMember] - 1], 100, "Faction MOTD: {FFFFFF}%s", motd); SendClientMessage(playerid, 0xA9C4E4FF, stringf[pInfo[playerid][pMember] - 1]); return 1; } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.