03.12.2012, 19:10
Guys,
Im having a problem with the OnPlayerText. Im trying to add, If player is VIP. So he gets this tag and etc. But im getting this error. Im blanking a bit. If somebody can kindly help me please.
Im having a problem with the OnPlayerText. Im trying to add, If player is VIP. So he gets this tag and etc. But im getting this error. Im blanking a bit. If somebody can kindly help me please.
pawn Код:
public OnPlayerText(playerid,text[])
{
if(PlayerInfo[playerid][pVIPLevel] < 1) {
new string[128], playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "[VIP]%s[%d]: [V.I.P] - ( %s )",playername, playerid, text);
SendClientMessageToAll(-1, string);
return 0;
}
else
{
if(muted[playerid] == 1)
{
SendClientMessage(playerid,-1,"ERROR:Your muted.");
return 0;
}
return 1;
}