Quote:
Originally Posted by -Luis
Nope, Still nothing..
|
pawn Код:
new gold[ MAX_PLAYERS ];
if (!strcmp("/toggold", cmdtext, true, 8))
{
if ( IsPlayerVipType( playerid, 1 ) ||
IsPlayerVipType( playerid, 2 ) ||
IsPlayerVipType( playerid, 3 )
)
{
if ( gold[ playerid ] == 1 )
{
gold [playerid ] = 0;
SetPlayerColor( playerid, COLOR_GOLD );
SendClientMessage( playerid, COLOR_WHITE, "[Donator Info] Your color is now set to Gold" );
}
else if ( gold[ playerid ] == 0 )
{
gold[ playerid ] = 1;
SetPlayerColor( playerid, COLOR_WHITE );
SendClientMessage( playerid, COLOR_WHITE, "[Donator Info] You have set your Color back to White" );
}
} else return SendClientMessage( playerid, COLOR_RED, "You are not a VIP Member");
return 1;
}
First of all, you should make the 'gold[ MAX_PLAYERS ];' variable GLOBAL.
Because creating it always over and over it will automatically set to 0 over and over.
Second, you set 10 characters at strcmp( ... ), it was 8 "/ t o g g o l d" = 8 characters.