Jump to content
  • 0

Ma ajuta cnv ?


Question

Posted

Imi poate face cnv in loc de /a sa scrie /mda si acolo sa vb si admini si moderatori ... sa va explic mai concret vrea sa imi face un chat al moderatorilor si adminilor in loc de /a la care scri /mda [text] pentru a putea vb doar moderatori cu admini. si comanda la moderator are pModerator si numele la moderator este asa Trial Moderator , Good Moderator , Best Moderator , Hard Moderator

[pawn] if(strcmp(cmd, "/admin", true) == 0 || strcmp(cmd, "/a", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

GetPlayerName(playerid, sendername, sizeof(sendername));

new length = strlen(cmdtext);

while ((idx < length) && (cmdtext[idx] <= ' '))

{

idx++;

}

new offset = idx;

new result[64];

while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))

{

result[idx - offset] = cmdtext[idx];

idx++;

}

result[idx - offset] = EOS;

if(!strlen(result))

{

SendClientMessage(playerid, COLOR_GRAD2, "» Scrie: (/a)dmin [admin chat]");

return 1;

}

if (PlayerInfo[playerid][pAdmin] == 1)

{

                format(string, sizeof(string), "» Trial Admin %s: %s.", sendername, result);

SendAdminMessage(0x996600FF, string);

}

if (PlayerInfo[playerid][pAdmin] == 2)

{

                format(string, sizeof(string), "» Good Admin %s: %s.", sendername, result);

SendAdminMessage(0x996600FF, string);

}

if (PlayerInfo[playerid][pAdmin] == 3)

{

                format(string, sizeof(string), "» Best Admin %s: %s.", sendername, result);

SendAdminMessage(0x996600FF, string);

}

if (PlayerInfo[playerid][pAdmin] == 4)

{

                format(string, sizeof(string), "» Hard Admin %s: %s.", sendername, result);

SendAdminMessage(0x996600FF, string);

}

if (PlayerInfo[playerid][pAdmin] == 1337)

{

                format(string, sizeof(string), "» Head Admin (1337) %s: %s.", sendername, result);

SendAdminMessage(0x996600FF, string);

}

if (PlayerInfo[playerid][pAdmin] == 1338)

{

                format(string, sizeof(string), "» Co-Owner %s: %s.", sendername, result);

SendAdminMessage(0x996600FF, string);

}

if (PlayerInfo[playerid][pAdmin] == 1339)

{

                format(string, sizeof(string), "» Owner %s: %s.", sendername, result);

SendAdminMessage(0x996600FF, string);

}

if (PlayerInfo[playerid][pAdmin] == 5000)

{

                format(string, sizeof(string), "» Administrator %s: %s.", sendername, result);

SendAdminMessage(0x996600FF, string);

}

printf("» Admin %s: %s", sendername, result);

}

return 1;

}[/pawn]

2 answers to this question

Recommended Posts

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.