01.12.2011, 21:34
ok i fixed the errors but when i type in the vip chat like for example:
/vip testing if this works
nothing will show up after "V.I.P Chat:"
??
EDIT: this is the current code :
/vip testing if this works
nothing will show up after "V.I.P Chat:"
??
EDIT: this is the current code :
PHP код:
CMD:vip( playerid, params[ ] )
{
if (gPlayerData[playerid][VIP] >= 1)
{
new string[128], pText[128];
if( isnull( params ) ) return SendClientMessage(playerid, 0xFFFFFFF,"Syntax error. Correct usage: /vip [text]");
format( string, sizeof( string ),"V.I.P Chat: {00FF00}%s{FF5500}: %s", playerid, pText );
foreach(Player,i) // for(new i = 0; i < MAX_PLAYERS; i++)
{
if ( gPlayerData[i][VIP] >= 1 )
{
SendClientMessage ( i , -1, string );
}
}
}
else if (gPlayerData[playerid][VIP] < 1)
{
SendClientMessage(playerid, -1, "Sorry, you cannot use the this Chat. Please Donate first.");
return 1;
}
return 1;
}