pawn Код:
Try this, Hope it works
CMD:v(playerid, params[])
{
new string[128]; //I've just put a string here
if(PlayerInfo[playerid][pDonateRank] > 0 || PlayerInfo[playerid][pAdmin] >= 1337)
{
if(isnull(params)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /v(ip chat) [message]");
if(VIPTimer[playerid] > 0)
{
format(string, sizeof(string), "You must wait %d seconds before speaking again in this channel.", VIPTimer[playerid]);
SendClientMessageEx(playerid, COLOR_GREY, string);
return 1;
}
if(PlayerInfo[playerid][pToggedVIPChat] == 0)
{
SendClientMessageEx(playerid, COLOR_GREY, "You have the channel toggled, /togvip to re-enable!");
return 1;
}
if(PlayerInfo[playerid][pVMuted] > 0)
{
SendClientMessageEx(playerid, COLOR_GREY, "You are muted from the VIP chat channel.");
return 1;
}
if(PlayerInfo[playerid][pDonateRank] == 1)
{
format(string, sizeof(string), "** Bronze VIP %s: %s", GetPlayerNameEx(playerid), params);
VIPTimer[playerid] = 5;
}
else if(PlayerInfo[playerid][pDonateRank] == 2)
{
format(string, sizeof(string), "** Silver VIP %s: %s", GetPlayerNameEx(playerid), params);
VIPTimer[playerid] = 5;
}
else if(PlayerInfo[playerid][pDonateRank] == 3)
{
format(string, sizeof(string), "** Gold VIP %s: %s", GetPlayerNameEx(playerid), params);
VIPTimer[playerid] = 5;
}
else if(PlayerInfo[playerid][pDonateRank] == 4)
{
format(string, sizeof(string), "** Platinum VIP %s: %s", GetPlayerNameEx(playerid), params);
VIPTimer[playerid] = 5;
}
else if(PlayerInfo[playerid][pDonateRank] == 5)
{
format(string, sizeof(string), "** VIP Moderator %s: %s", GetPlayerNameEx(playerid), params);
}
else if(PlayerInfo[playerid][pDonateRank] == 6)
{
format(string, sizeof(string), "** Special Moderator %s: %s", GetPlayerNameEx(playerid), params);
}
if(PlayerInfo[playerid][pAdmin] == 2)
{
format(string, sizeof(string), "** Junior Admin %s: %s", GetPlayerNameEx(playerid), params);
}
if(PlayerInfo[playerid][pAdmin] == 3)
{
format(string, sizeof(string), "** General Admin %s: %s", GetPlayerNameEx(playerid), params);
}
if(PlayerInfo[playerid][pAdmin] == 4)
{
format(string, sizeof(string), "** Senior Admin %s: %s", GetPlayerNameEx(playerid), params);
}
if(PlayerInfo[playerid][pAdmin] == 1337)
{
format(string, sizeof(string), "** Head Admin %s: %s", GetPlayerNameEx(playerid), params);
}
else if(PlayerInfo[playerid][pAdmin] == 1338)
{
format(string, sizeof(string), "** Server Manager %s: %s", GetPlayerNameEx(playerid), params);
}
/*else if(PlayerInfo[playerid][pAdmin] == 99997)
{
format(string, sizeof(string), "** Server Manager %s: %s", GetPlayerNameEx(playerid), params);
}*/
else if(PlayerInfo[playerid][pAdmin] == 99998)
{
format(string, sizeof(string), "** Server Co-Owner %s: %s", GetPlayerNameEx(playerid), params);
}
else if(PlayerInfo[playerid][pAdmin] == 99999)
{
format(string, sizeof(string), "** Server Owner %s: %s", GetPlayerNameEx(playerid), params);
}
else if(PlayerInfo[playerid][pAdmin] == 100000)
format(string, sizeof(string), "** Server Scripter %s: %s", GetPlayerNameEx(playerid), params);
}
if (PlayerInfo[playerid][pDonateRank] >= 1 || PlayerInfo[playerid][pAdmin] >= 2)
{
SendVIPMessage(COLOR_VIP, string);
}
Log("logs/vipchat.log", string);
}
return 1;
}