- 0
Premium Chat
-
Similar Content
-
- 9 replies
- 1.481 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
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.
Question
Iulian
Buna vreau sa fac o comanda /pchat (pentru intrare si iesire din chatul premium si sa o adaug in gm)
Cand scrie cineva /pchat sa anunte membrii de pe chatul premium (doar cei care sunt conectati) ca a intrat/iesit un player
[pawn] if(strcmp(cmd, "/premium", true) == 0 || strcmp(cmd, "/p", 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, "USAGE: (/p)remium [premium chat]");
return 1;
}
format(string, sizeof(string), "{FF00FF}Admin{FFFFFF} %s: %s", sendername, result);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
SendPremiumMessage(0x999900FF, string);
}
else if(PlayerInfo[playerid][pDonateRank] >= 1)
{
format(string, sizeof(string),"{FFCC00}Premium {FFFFFF}%s: %s", sendername, result);
SendPremiumMessage(0x999900FF, string);
}
printf("Admin %s: %s", sendername, result);
}
return 1;
}[/pawn]
Rate me
1 answer to this question
Recommended Posts