leha_jons
Умник
где все команды
ко всем stock
PHP:
else if(strcmp(cmd, "/vipchat", true) == 0 || strcmp(cmd, "/v", true) == 0)
{
if(PlayerInfo[playerid][pDonateRank] >= 1 || PlayerInfo[playerid][pAdmin] >= 1)
{
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)) return SendClientMessage(playerid, COLOR_WHITE, "::: Ââåäèòå: (/v)ipchat [òåêñò]");
format(string, sizeof(string), "[VIP]:< %s[%d]: %s >", sendername, playerid,result);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
SendAdminMessage(COLOR_YELLOW, string);
SendVipMessage(COLOR_YELLOW, string);
}
}
return 1;
}
PHP:
stock SendVipMessage(color, string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pDonateRank] >= 1)
{
SendClientMessage(i, color, string);
}
}
}
}
