- 0
Premium Chat
-
Similar Content
-
- 1 reply
- 99 views
-
- 1 reply
- 246 views
-
- 0 replies
- 451 views
-
- 13 replies
- 866 views
-
- 12 replies
- 2,271 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
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
Link to comment
Share on other sites
1 answer to this question
Recommended Posts