Jump to content
News ticker
  • Bienvenue sur le nouveau forum VeryGames
  • Welcome to the new VeryGames forum
  • VeryNews

    Besoin d'aide : Skins


    Tempestia

    Recommended Posts

    Donc, pour commencer, des personnes vont me proposer Skin Chooser ou Simple Skin. Je l'ai deja tester.

     

    Ce que je voudrais : Que quand ont tape "!lapin" dans le chat, cela le transforme en

    models/player/slow/sam_and_max/max/slow_v2.mdl

     

    Mais je veut que ce sois uniquement pour le flag "z".

     

    Merci d'avance, cordialement, Tempestia.

    Edited by Marechoux
    Link to comment
    Share on other sites

    Ce que je voudrais : Que quand ont tape "!lapin" dans le chat, cela le transforme en

     

    Reforme cela, ça fais penser à une demande complète de plugin x)

     

    --> Tu créé ta commande :

     

    public OnPluginStart()
    {   
        RegAdminCmd("sm_lapin", Commdande_Lapin, ADMFLAG_ROOT);
    }
    

     

    --> Tu précache les skin et tu fais télécharger le skin

     

    (j'ai oublié comment faire ^^")
    ça doit être un truc du genre : PrecacheModel
    

     

    --> Tu met le reste

     

    public Action:Commdande_Lapin(client, args)
    {
           SetEntityModel(client, "models/player/slow/sam_and_max/max/slow_v2.mdl");
    }
    
    

     

    Kriax.

    Link to comment
    Share on other sites

    #include <sdktools>
    
    
    public Plugin:myinfo =
    {
       name = "Lapin Skin",
       description = "Met le skin lapin via !lapin",
       author = "Slayzer",
       version = "1.0.0",
       url = "http://magnetik.verygames.net/forum"
    };
    
    
    public OnPluginStart()
    {
    RegConsoleCmd("sm_lapin", Command_Lapin, "Give Skin Lapin");
    }
    
    
    public OnMapStart()
    {
    AddFileToDownloadsTable("models/player/slow/sam_and_max/max/slow_v2.dx80.vtx");
    AddFileToDownloadsTable("models/player/slow/sam_and_max/max/slow_v2.dx90.vtx");
    AddFileToDownloadsTable("models/player/slow/sam_and_max/max/slow_v2.mdl");
    AddFileToDownloadsTable("models/player/slow/sam_and_max/max/slow_v2.sw.vtx");
    AddFileToDownloadsTable("models/player/slow/sam_and_max/max/slow_v2.vvd");
    AddFileToDownloadsTable("materials/models/player/slow/sam_and_max/max/slow_black.vmt");
    AddFileToDownloadsTable("materials/models/player/slow/sam_and_max/max/slow_black.vtf");
    AddFileToDownloadsTable("materials/models/player/slow/sam_and_max/max/slow_ears.vmt");
    AddFileToDownloadsTable("materials/models/player/slow/sam_and_max/max/slow_ears.vtf");
    AddFileToDownloadsTable("materials/models/player/slow/sam_and_max/max/slow_feet.vmt");
    AddFileToDownloadsTable("materials/models/player/slow/sam_and_max/max/slow_feet.vtf");
    AddFileToDownloadsTable("materials/models/player/slow/sam_and_max/max/slow_max.vmt");
    AddFileToDownloadsTable("materials/models/player/slow/sam_and_max/max/slow_pink.vmt");
    AddFileToDownloadsTable("materials/models/player/slow/sam_and_max/max/slow_pink.vtf");
    AddFileToDownloadsTable("materials/models/player/slow/sam_and_max/max/slow_teeth.vmt");
    AddFileToDownloadsTable("materials/models/player/slow/sam_and_max/max/slow_teeth.vtf");
    AddFileToDownloadsTable("materials/models/player/slow/sam_and_max/max/slow_white.vmt");
    AddFileToDownloadsTable("materials/models/player/slow/sam_and_max/max/slow_white.vtf");
    PrecacheModel("models/player/slow/sam_and_max/max/slow_v2.mdl", true);
    }
    
    
    public Action:Command_Lapin(client, args)
    {
    if (IsClientInGame(client))
    {
    	if (IsPlayerAlive(client))
    	{
    		if (GetUserFlagBits(client) & ADMFLAG_ROOT)
    		{
    			PrintToChat(client, "[sM] : Vous avez activé votre skin avec succès.");
    			SetEntityModel(client, "models/player/slow/sam_and_max/max/slow_v2.mdl");
    			return Plugin_Handled;
    		}
    		else
    		{
    			PrintToChat(client, "[sM] : Vous n'avez pas accès a cette commande.");
    		}
    	}
    	else
    	{
    		PrintToChat(client, "[sM] : Vous devez être en vie.");
    	}
    }
    return Plugin_Continue;
    }
    

     

    pas très sécurisé mais devrait fonctionné, a compiler avec l'extension de fichier .sp a compiler sur le site SM

    Link to comment
    Share on other sites

    #include <sdktools>
    
    
    public Plugin:myinfo =
    {
       name = "Lapin Skin",
       description = "Met le skin lapin via !lapin",
       author = "Slayzer",
       version = "1.0.0",
       url = "http://magnetik.verygames.net/forum"
    };
    
    
    public OnPluginStart()
    {
       RegAdminCmd("sm_lapin", Command_Lapin, ADMFLAG_ROOT, "Give Skin Lapin");
    }
    
    
    public OnMapStart()
    {
       AddFileToDownloadsTable("models/player/slow/sam_and_max/max/slow_v2.dx80.vtx");
       AddFileToDownloadsTable("models/player/slow/sam_and_max/max/slow_v2.dx90.vtx");
       AddFileToDownloadsTable("models/player/slow/sam_and_max/max/slow_v2.mdl");
       AddFileToDownloadsTable("models/player/slow/sam_and_max/max/slow_v2.sw.vtx");
       AddFileToDownloadsTable("models/player/slow/sam_and_max/max/slow_v2.vvd");
       AddFileToDownloadsTable("materials/models/player/slow/sam_and_max/max/slow_black.vmt");
       AddFileToDownloadsTable("materials/models/player/slow/sam_and_max/max/slow_black.vtf");
       AddFileToDownloadsTable("materials/models/player/slow/sam_and_max/max/slow_ears.vmt");
       AddFileToDownloadsTable("materials/models/player/slow/sam_and_max/max/slow_ears.vtf");
       AddFileToDownloadsTable("materials/models/player/slow/sam_and_max/max/slow_feet.vmt");
       AddFileToDownloadsTable("materials/models/player/slow/sam_and_max/max/slow_feet.vtf");
       AddFileToDownloadsTable("materials/models/player/slow/sam_and_max/max/slow_max.vmt");
       AddFileToDownloadsTable("materials/models/player/slow/sam_and_max/max/slow_pink.vmt");
       AddFileToDownloadsTable("materials/models/player/slow/sam_and_max/max/slow_pink.vtf");
       AddFileToDownloadsTable("materials/models/player/slow/sam_and_max/max/slow_teeth.vmt");
       AddFileToDownloadsTable("materials/models/player/slow/sam_and_max/max/slow_teeth.vtf");
       AddFileToDownloadsTable("materials/models/player/slow/sam_and_max/max/slow_white.vmt");
       AddFileToDownloadsTable("materials/models/player/slow/sam_and_max/max/slow_white.vtf");
       PrecacheModel("models/player/slow/sam_and_max/max/slow_v2.mdl", true);
    }
    
    
    public Action:Command_Lapin(client, args)
    {
        if (IsClientInGame(client) && IsPlayerAlive(client))
        {
             PrintToChat(client, "[sM] : Vous avez activé votre skin avec succès.");
             SetEntityModel(client, "models/player/slow/sam_and_max/max/slow_v2.mdl");
             return Plugin_Handled;
        }
        else
        {
            PrintToChat(client, "[sM] : Vous devez être en vie.");
        }
       return Plugin_Continue;
    }
    

     

    J'ai corriger un petit truc (Pas une erreur)

     

    Mais je veut que ce sois uniquement pour le flag "z".

     

    Kriax.

    Link to comment
    Share on other sites

    Je pense que ces un peux plus simple d'utilisé une fonctionne directement, que d'ajouté une condition ^^

     

    Enfin, ces la dernière fois que je rendrais service vue que tu pète une case :)

     

    if (IsClientInGame(client))
    { 
       if(IsPlayerAlive(client))
    }
    

     

    Tu peux tout mettre enssemble :

     

        if (IsClientInGame(client) && IsPlayerAlive(client))
    

     

    Kriax.

    Link to comment
    Share on other sites

    Je pense que ces un peux plus simple d'utilisé une fonctionne directement, que d'ajouté une condition ^^

     

    Enfin, ces la dernière fois que je rendrais service vue que tu pète une case :)

     

    Kriax.

     

    Oui mais les deux servent a rien, le RegAdminCmd il me semble renvoi le message d'erreur fait par Sourcemod, le mien est "personnalisé", en soit la modification ne servait a rien, merci quand même.

    Link to comment
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Reply to this topic...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...