Tempestia Posted July 17, 2012 Share Posted July 17, 2012 (edited) 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 July 17, 2012 by Marechoux Quote Link to comment Share on other sites More sharing options...
Kriax Posted July 17, 2012 Share Posted July 17, 2012 --> AlliedModders <-- Tu n'es pas sur un forum de création de pluins x) Kriax. Quote Link to comment Share on other sites More sharing options...
Tempestia Posted July 17, 2012 Author Share Posted July 17, 2012 Euh... Je demande juste de l'aide pour le code... Quote Link to comment Share on other sites More sharing options...
Kriax Posted July 17, 2012 Share Posted July 17, 2012 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. Quote Link to comment Share on other sites More sharing options...
Slayzer Posted July 17, 2012 Share Posted July 17, 2012 Je peux te le faire, me faut juste le lien de ton skin que je puisse précache et force download les fichiers. merci bien d'avance ^^ Quote Link to comment Share on other sites More sharing options...
Slayzer Posted July 17, 2012 Share Posted July 17, 2012 En effet Kriax : PrecacheModel et AddFileToDownloadsTable pour dl :p Quote Link to comment Share on other sites More sharing options...
Kriax Posted July 17, 2012 Share Posted July 17, 2012 Mais quel mémoire j'ai pour le précache. Le dl j'avais un peux oublier ^^" Quote Link to comment Share on other sites More sharing options...
Slayzer Posted July 17, 2012 Share Posted July 17, 2012 #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 Quote Link to comment Share on other sites More sharing options...
Tempestia Posted July 17, 2012 Author Share Posted July 17, 2012 Magnifique, merci. Dernier point => Comment compiler en SMX (moi sa beug :/) ? Ps : C'est quoi ton steam amis Slavzer ? Quote Link to comment Share on other sites More sharing options...
Slayzer Posted July 17, 2012 Share Posted July 17, 2012 Magnifique, merci. Dernier point => Comment compiler en SMX (moi sa beug :/) ? Ps : C'est quoi ton steam amis Slavzer ? je ne donne jamais mon steam. => tu enregistre ce que je t'ai mit dans notepad => tu met par exemple lapin.sp => tu vas sur http://sourcemod.net/compiler.php et tu compile le fichier. Quote Link to comment Share on other sites More sharing options...
Kriax Posted July 17, 2012 Share Posted July 17, 2012 #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. Quote Link to comment Share on other sites More sharing options...
Slayzer Posted July 17, 2012 Share Posted July 17, 2012 tu te fout de moi kriax la ? >< Si j'ai mit un RegConsoleCmd c'est pas pour rien... Regarde ma condition dans ma commande... Inutile de reprendre mon code et d'y ajouté une connerie... Quote Link to comment Share on other sites More sharing options...
Tempestia Posted July 17, 2012 Author Share Posted July 17, 2012 Comment pouvoir te contacter si j'ai une problème? (Car honnetement, tu m'as bien aider) Quote Link to comment Share on other sites More sharing options...
Slayzer Posted July 17, 2012 Share Posted July 17, 2012 En message privé sur ce Forum si tu veux ou si tu as une autre demande a faire ^^" Quote Link to comment Share on other sites More sharing options...
Kriax Posted July 17, 2012 Share Posted July 17, 2012 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. Quote Link to comment Share on other sites More sharing options...
Slayzer Posted July 17, 2012 Share Posted July 17, 2012 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. Quote Link to comment Share on other sites More sharing options...
Kriax Posted July 17, 2012 Share Posted July 17, 2012 À la place de surchargé ton code, tu peux l'optimisé. Enfin, moi ces juste pour la propreté ^^ Kriax. Quote Link to comment Share on other sites More sharing options...
Slayzer Posted July 17, 2012 Share Posted July 17, 2012 j'aime bien savoir l'erreur que j'ai quand j'en est une :), mon code je le trouve très propre, merci de t'en préoccupé :) Quote Link to comment Share on other sites More sharing options...
Tempestia Posted July 17, 2012 Author Share Posted July 17, 2012 résolu. Quote Link to comment Share on other sites More sharing options...
Mr.Alien Posted July 17, 2012 Share Posted July 17, 2012 je ne donne jamais mon steam. Slayzer est très rechercher donc tout le monde veut sa peau ! 8-) * à prendre avec humour * Quote Link to comment Share on other sites More sharing options...
Slayzer Posted July 18, 2012 Share Posted July 18, 2012 Slayzer est très rechercher donc tout le monde veut sa peau ! 8-) * à prendre avec humour * La police me recherche (a) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.