22.02.2012, 16:08
i have made a vskin script but when vip spawn the skin will restore with its normal skin. help !! how i make that if a vip choose his skin. the skin not restore
dcmd_skin( playerid, params[ ] )
{
new
skin;
if( sscanf( params, "i", skin ) ) return SendClientMessage( playerid, -1, "Usage: /skin <ID>" );
if( skin > 299 || skin < 1 ) return SendClientMessage( playerid, -1, "Invalid ID. Available Skin IDs are 1 to 299!" );
new
string[ 128 ];
format( string, sizeof( string ), "You have changed your skin to %d", skin );
SendClientMessage( playerid, -1, string );
SetPlayerSkin( playerid, skin );
return 1;
}
if(PlayerInfo[playerid][vip] >= 1){
SetPVarInt(playerid, "Skin", -1);
if(GetPVarInt(playerid,"Skin") != -1) SetPlayerSkin(playerid, GetPVarInt(playerid, "Skin"));
dcmd_skin( playerid, params[ ] )
{
new skin;
if(PlayerInfo[playerid][vip] >= 1) { //if the player is VIP, continue
if( sscanf( params, "i", skin ) ) return SendClientMessage( playerid, -1, "Usage: /skin <ID>" );
if( skin > 299 || skin < 1 ) return SendClientMessage( playerid, -1, "Invalid ID. Available Skin IDs are 1 to 299!" );
new string[ 128 ];
format( string, sizeof( string ), "You have changed your skin to %d", skin);
SendClientMessage( playerid, -1, string );
SetPlayerSkin(playerid, skin);
SetPVarInt(playerid, "Skin", skin); //we also set the PVar to the skin id that he entered, so it will reset next time the player spawns.
}
else SendClientMessage(playerid, YOUR COLOUR, "You are not a VIP. You cannot use this command.");
return 1;
}
if(PlayerInfo[playerid][Skin] != -1) SetPlayerSkin......