Apply Skin, color, weapons, etc... offer rep++ :D
#1

Hi, i have a big problem.
I make clans system, with clan personal: color, weapons, skin, leader skin, ... and i have a problem when player spawn, the color, weapons, skin and leader skin don't apply to the player ... I don't know what are the problem.

Here is the code ... maybe i script something wrong...
Код:
public OnPlayerSpawn( playerid )
{
    format( pFile, sizeof( pFile ), "Clans/%s.ini", PlayerName( playerid ) );
    format( gFile, sizeof( gFile ), "Clans/%s.ini", dini_Get( pFile, "Clan" ) );
	if ( dini_Exists( pFile ) )
	{
	    SetPlayerSkin( playerid, strval( dini_Get( gFile, "LeaderSkin" ) ) );
		SetPlayerColor( playerid, strval( dini_Get( gFile, "ClanColor" ) ) );
		GivePlayerWeapon( playerid, strval( dini_Get( gFile, "Weapon1" ) ), strval( dini_Get( gFile, "Ammo1" ) ) );
		GivePlayerWeapon( playerid, strval( dini_Get( gFile, "Weapon2" ) ), strval( dini_Get( gFile, "Ammo2" ) ) );
		GivePlayerWeapon( playerid, strval( dini_Get( gFile, "Weapon3" ) ), strval( dini_Get( gFile, "Ammo3" ) ) );
		GivePlayerWeapon( playerid, strval( dini_Get( gFile, "Weapon4" ) ), strval( dini_Get( gFile, "Ammo4" ) ) );
		GivePlayerWeapon( playerid, strval( dini_Get( gFile, "Weapon5" ) ), strval( dini_Get( gFile, "Ammo5" ) ) );
    }
    else
	{
	    return 1;
	}
    if ( strfind( dini_Get( gFile, "Member" ), PlayerName( playerid ), true ) != -1 )
	{
		SetPlayerSkin( playerid, strval( dini_Get( gFile, "MemberSkin" ) ) );
		SetPlayerColor( playerid, strval( dini_Get( gFile, "ClanColor" ) ) );
		GivePlayerWeapon( playerid, strval( dini_Get( gFile, "Weapon1" ) ), strval( dini_Get( gFile, "Ammo1" ) ) );
		GivePlayerWeapon( playerid, strval( dini_Get( gFile, "Weapon2" ) ), strval( dini_Get( gFile, "Ammo2" ) ) );
		GivePlayerWeapon( playerid, strval( dini_Get( gFile, "Weapon3" ) ), strval( dini_Get( gFile, "Ammo3" ) ) );
		GivePlayerWeapon( playerid, strval( dini_Get( gFile, "Weapon4" ) ), strval( dini_Get( gFile, "Ammo4" ) ) );
		GivePlayerWeapon( playerid, strval( dini_Get( gFile, "Weapon5" ) ), strval( dini_Get( gFile, "Ammo5" ) ) );
	}
    return 1;
}
PS. - On save file is saved everything what is need to save.
Reply


Messages In This Thread
Apply Skin, color, weapons, etc... offer rep++ :D - by Edvin - 07.01.2012, 16:10
Re: Apply Skin, color, weapons, etc... offer rep++ :D - by Edvin - 08.01.2012, 01:07
Re: Apply Skin, color, weapons, etc... offer rep++ :D - by Edvin - 08.01.2012, 11:45
Re: Apply Skin, color, weapons, etc... offer rep++ :D - by TheArcher - 08.01.2012, 11:58

Forum Jump:


Users browsing this thread: 3 Guest(s)