TheGodfather Posted November 6, 2021 Report Share Posted November 6, 2021 Salut, am aceasta comanda /servername dar nu trimite mesajul acela tuturor playerilor, numele la server se schimba corect. if(strcmp(cmdtext, "/servername", true) == 0) { if(PlayerInfo[playerid][pAdmin] < return SCM(playerid, COLOR_WHITE, AdminOnly); new newstring[512], idx, tmp[512]; tmp = strtok(cmdtext, idx); if(strlen(cmdtext[12]) < 1) return SCM(playerid, COLOR_GREY,"Syntax: /servername <nume server>"); format(tmp, sizeof(tmp), "hostname %s", cmdtext[12]); SendRconCommand(tmp); format(newstring, sizeof(newstring), "[SERVER] {FFFFFF}Fondator {DA0000}%s {FFFFFF}a schimbat numele server-ului in {FFFFFF}'%s'.", GetName(playerid), cmdtext[12]); SCMTA(COLOR_LIGHTBLUE, newstring); return 1; } Quote Link to comment Share on other sites More sharing options...
0 TheGodfather Posted November 6, 2021 Author Report Share Posted November 6, 2021 Am rezolvat, T/C Quote Link to comment Share on other sites More sharing options...
Question
TheGodfather
Salut, am aceasta comanda /servername dar nu trimite mesajul acela tuturor playerilor, numele la server se schimba corect.
if(strcmp(cmdtext, "/servername", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] < return SCM(playerid, COLOR_WHITE, AdminOnly);
new newstring[512], idx, tmp[512];
tmp = strtok(cmdtext, idx);
if(strlen(cmdtext[12]) < 1) return SCM(playerid, COLOR_GREY,"Syntax: /servername <nume server>");
format(tmp, sizeof(tmp), "hostname %s", cmdtext[12]);
SendRconCommand(tmp);
format(newstring, sizeof(newstring), "[SERVER] {FFFFFF}Fondator {DA0000}%s {FFFFFF}a schimbat numele server-ului in {FFFFFF}'%s'.", GetName(playerid), cmdtext[12]);
SCMTA(COLOR_LIGHTBLUE, newstring);
return 1;
}
Link to comment
Share on other sites
1 answer to this question
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.