SetVip Command Problem [ NEED HELP ]
#1

Here is the command:
Код:
CMD:setvip( playerid, params[] )
{
	if( pInfo[ playerid ][ Level ] >= 10 || IsPlayerAdmin( playerid ))
	{
		new target, vip, string[124], pName[24];
		if( sscanf( params, "ud", target, vip )) return SCM( playerid, C_RED, "USAGE: /setvip [ playerid ] [ level ]");
		if( !IsPlayerConnected( target )) return SCM( playerid, C_RED, "[ERROR]: {FFFFFF}Player not connected.");
		if( vip < 0 || vip > 4 ) return SCM( playerid, C_RED, "ERROR:Invalid level. (1-4)");
		GetPlayerName( target, pName, sizeof( pName ));
		format( string, sizeof( string ), "%s has been promoted to a vip level %d !", pName, vip);
		SCMToAll( C_WHITE, string);
		pInfo[ playerid ][ Vip ] = vip;
		return ( 1 );
	}  else return SCM( playerid, C_RED, "[ERROR]: {FFFFFF}You need to be a higher level to use this command !");
}
It saves at players disconnect:
Код:
	INI_WriteInt( PlayerFile,           "Vip",     		pInfo[ playerid ][ Vip ]);
And on a player file it appear there if it has or no V.I.P:
Код:
Vip = 3
But, it doesn't saves...i setvip to x, it reconnects and the vip isn't...
Reply


Messages In This Thread
SetVip Command Problem [ NEED HELP ] - by RaZzZzoR - 08.11.2012, 19:14
Re: SetVip Command Problem [ NEED HELP ] - by Konstantinos - 08.11.2012, 19:47
Re: SetVip Command Problem [ NEED HELP ] - by Face9000 - 08.11.2012, 21:59
Re: SetVip Command Problem [ NEED HELP ] - by Konstantinos - 09.11.2012, 09:07
Re: SetVip Command Problem [ NEED HELP ] - by Face9000 - 09.11.2012, 09:26
Re: SetVip Command Problem [ NEED HELP ] - by JaKe Elite - 09.11.2012, 09:29

Forum Jump:


Users browsing this thread: 1 Guest(s)