August 17, 201114 yr comment_64121 Yop. Je me suis dis que ca pourrait être intéressant de voir si d'autre personnes s'étaient intéressé a Sourcemod et avait fait l'expérience de coder quelques plugins (quel qu'ils soient, même un semblant d'Hello World ^^).Donc si vous en faites parti, faites le savoir sur ce topic . Avec quelques exemples de plugins fait par vos soins (et pas ceux que quelqu'un d'autre hein ^_^), ca serait parfait . PS : Wylloh tu sais pas coder cherche pas noraj. Report
August 17, 201114 yr comment_64122 je fais du sourcemod (à base de popopo eventscript), exemple: http://forums.allied...ad.php?t=111492 Report
August 17, 201114 yr comment_64125 on parle de raijojp-le-créateur-de-plugin-que-tous-les-autres-entrent-en-conflit ? Report
August 19, 201114 yr comment_64239 Moi en une semaine sur sourcemod api j'ai fait sa mais bon 1.#include <sourcemod> 2.#include <colors.inc> 3. 4.public Plugin:myinfo = 5.{ 6. name = "Trouver Steam ID", 7. author = "@lex-92 et SM api ^^", 8. description = "Permet au joueur de trouver son steam id", 9. version = "1.0", 10. url = "http://www.soul-team.verygames.net" 11.} 12. 13.public OnPluginStart() 14.{ 15. RegConsoleCmd("sm_monsteamid", mysteam); 16.} 17. 18.public Action:mysteam(client, args) 19.{ 20. new String:steamid[64]; 21. GetClientAuthString(client, steamid, 64); 22. CPrintToChat(client, "{green}[soul-Team]{default}Votre steam id est le : {red}%s",steamid); 23.} :ermm: Mon petit script ^^ Edited August 21, 201114 yr by @lex-92 Report
March 5, 201214 yr comment_87263 T'es un top @lex-92 ta réussi a trouvé celui de steven sur pastbin. http://pastebin.com/dUaxB58Y Et tu trouve que c'est respectueux de dire que c'est toi qui la fait ? Mon petit script quoi mes mdr. Report
March 5, 201214 yr comment_87334 Bien de déterrer un post vieux de 6 mois pour étaler votre pseudo culture ?A se demander qui est le plus ridicule... Report
March 5, 201214 yr comment_87377 http://images.forum-auto.com/mesimages/631760/pelleteuse_mont_blanc.jpg Report
August 8, 201213 yr comment_113126 j aimerai apprendre merci =) cherche un bon tuto qui expliqu concretement et en francais de preference =) Report
August 9, 201213 yr comment_113217 j aimerai apprendre merci =) cherche un bon tuto qui expliqu concretement et en francais de preference =)Ca n'existe pas sinon, je serais deja en train de coder mdr.C'est que en anglais et c un mini dictionnaire, il n'y a pas de tuto appromement dit enfin depuis la derniere fois que j'ai regarder en tout cas. Report
August 9, 201213 yr comment_113233 Moi ça fais 4mois que je code en Sourcepawn et franchement, même avec l'anglais pouris que j'ai et bien je comprend tout ^^ Ces pas dure Un petit professeur qui code et qui est la quand vous avez besoin et la tour est joué Pour ma part ça fais un moment que on m'aide plus et que je jou les proffesseur xD Kriax. Report
August 9, 201213 yr comment_113244 sur le site sourcemod ya genre des milliard de page ,qui expliquent mais j ai pas l impression que sa soit trop concret , tu trouve pas une personne qui montre comment il fai son pluggin de A a Z Report
August 9, 201213 yr comment_113246 // Tu met les includes néssésaire, celle la sont par défaut (Pas toute obligatoire dans mon exemple) #include <sourcemod> #include <sdktools> #include <cstrike> // Tu créé les information du plugin public Plugin:myinfo = { name = "*~ EXMPLE ~*", author = "*~ Kriax ~*", description = "Plugin d'exmple", version = "1.0", } // Quand la map commence public OnMapStart() { // Tu hook un event HookEvent("player_spawn", OnPlayerSpawn); // Premier argument = Le nom de l'event // Argument 2 = Le nom de l'event, ces toi qui le choisis } // Quand le joueur respawn public Action:OnPlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast) { // Tu créé un nouveau client new client = GetClientOfUserId(GetEventInt(event, "userid")); // Tu lui envoye une phrase PrintToChat(client, "Vous venez de respawn"); } Aide toi des deux liens :Les Events : http://wiki.alliedmo..._Events_(SourceL'api de Sourcemod : http://docs.sourcemod.net/api/ Pour apprendre à codé, regarde de petit plugin et essaye de les comprendres, au fil du temps tu coderas 3000 lignes sans faire une erreur ou une warning Kriax. Edited August 9, 201213 yr by kriax Report
August 9, 201213 yr comment_113292 N'oublie pas que le Sourcepawn ne ce limite pas à cela Si tu as besoin d'un coup de main, je passerais de temps en temps sur le forum Kriax. Report
August 12, 201213 yr comment_113511 pour l exemple si je veu passer ce pluggin pour CS:GO je dois changer quoi ? /* * QuickDefuse - by pRED* * * CT's get a menu to select a wire to cut when they defuse the bomb * - Choose the right wire - Instant Defuse * - Choose the wrong wire - Instant Explosion * * T's also get the option to select the correct wire, otherwise it's random * * Ignoring the menu's or selecting exit will let the game continue normally * */ #include <sourcemod> #include <sdktools> #define PLUGIN_VERSION "0.3" new wire new Handle:cvar_tchoice new String:wirecolours[4][] = {"Blue","Yellow","Red","Green"} public Plugin:myinfo = { name = "QuickDefuse", author = "pRED*", description = "Let's CT's choose a wire for quick defusion", version = PLUGIN_VERSION, url = "http://www.sourcemod.net/" }; public OnPluginStart() { CreateConVar("sm_quickdefuse_version", PLUGIN_VERSION, "Quick Defuse Version", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY) HookEvent("bomb_begindefuse", Event_Defuse, EventHookMode_Post) HookEvent("bomb_beginplant", Event_Plant, EventHookMode_Post) HookEvent("bomb_planted", Event_Planted, EventHookMode_PostNoCopy) HookEvent("bomb_abortdefuse", Event_Abort, EventHookMode_Post) HookEvent("bomb_abortplant", Event_Abort, EventHookMode_Post) cvar_tchoice = CreateConVar("qd_tchoice", "1", "Sets whether Terrorists can select a wire colour (QuickDefuse)") } public Event_Plant(Handle:event, const String:name[], bool:dontBroadcast) { new clientId = GetEventInt(event, "userid") new client = GetClientOfUserId(clientId) wire = 0; //let the planter choose a wire if (GetConVarInt(cvar_tchoice)) { new Handle:panel = CreatePanel() SetPanelTitle(panel, "Choose a Wire:" ) DrawPanelText(panel, " ") DrawPanelText(panel, "The CT's can try guess this for an instant defuse") DrawPanelText(panel, "Exit, or ignore this for a random wire") DrawPanelText(panel, " ") DrawPanelItem(panel,wirecolours[0]) DrawPanelItem(panel,wirecolours[1]) DrawPanelItem(panel,wirecolours[2]) DrawPanelItem(panel,wirecolours[3]) DrawPanelText(panel, " "); DrawPanelItem(panel, "Exit") SendPanelToClient(panel, client, PanelPlant, 5) CloseHandle(panel) } } public Event_Planted(Handle:event, const String:name[], bool:dontBroadcast) { if (wire == 0) wire = GetRandomInt(1,4) } public Event_Defuse(Handle:event, const String:name[], bool:dontBroadcast) { new clientId = GetEventInt(event, "userid") new client = GetClientOfUserId(clientId) new bool:kit = GetEventBool(event, "haskit") //show a menu to the client offering a choice to pull/cut the wire new Handle:panel = CreatePanel() SetPanelTitle(panel, "Choose a Wire:" ) DrawPanelText(panel, "Ignore this to defuse normally") DrawPanelText(panel, " ") DrawPanelText(panel, "Get it right and the bomb is defused") DrawPanelText(panel, "Get it wrong and the bomb instantly explodes") if (!kit) { DrawPanelText(panel, "With no defuse kit you have a 50% chance of the bomb exploding") DrawPanelText(panel, "even if you choose the right wire") } DrawPanelText(panel, " ") DrawPanelItem(panel,"Blue") DrawPanelItem(panel,"Yellow") DrawPanelItem(panel,"Red") DrawPanelItem(panel,"Green") DrawPanelText(panel, " "); DrawPanelItem(panel, "Exit") if (kit) SendPanelToClient(panel, client, PanelDefuseKit, 5) else SendPanelToClient(panel, client, PanelNoKit, 5) CloseHandle(panel) } public PanelPlant(Handle:menu, MenuAction:action, param1, param2) { if (action == MenuAction_Select && param2 > 0 && param2 < 5) //User selected a valid wire colour { wire = param2 PrintToChat(param1,"\x01\x04[QuickDefuse] You chose the %s wire",wirecolours[param2-1]) } } public PanelDefuseKit(Handle:menu, MenuAction:action, param1, param2) { if (action == MenuAction_Select && param2 > 0 && param2 < 5) //User selected a valid wire colour { new bombent = FindEntityByClassname(-1,"planted_c4") if (bombent) { new String:name[32] GetClientName(param1,name,sizeof(name)) if (param2 == wire) { SetEntPropFloat(bombent, Prop_Send, "m_flDefuseCountDown", 1.0) PrintToChatAll("\x01\x04[QuickDefuse] %s correctly cut the %s wire for an instant C4 defusal (1:4 odds)",name,wirecolours[param2-1]) } else { SetEntPropFloat(bombent, Prop_Send, "m_flC4Blow", 1.0) PrintToChatAll("\x01\x04[QuickDefuse] %s detonated the C4 with an incorrect wire choice of %s (3:4 odds) The correct wire was %s",name,wirecolours[param2-1],wirecolours[wire-1]) } } } } public PanelNoKit(Handle:menu, MenuAction:action, param1, param2) { if (action == MenuAction_Select && param2 > 0 && param2 < 5) //User selected a valid wire colour { new bombent = FindEntityByClassname(-1,"planted_c4") if (bombent) { new String:name[32] GetClientName(param1,name,sizeof(name)) if (param2 == wire && GetRandomInt(0,1)) { SetEntPropFloat(bombent, Prop_Send, "m_flDefuseCountDown", 1.0) PrintToChatAll("\x01\x04[QuickDefuse] %s correctly pulled the %s wire for an instant C4 defusal (1:8 odds)",name,wirecolours[param2-1]) } else { SetEntPropFloat(bombent, Prop_Send, "m_flC4Blow", 1.0) if (param2 != wire) PrintToChatAll("\x01\x04[QuickDefuse] %s detonated the C4 with an incorrect wire choice of %s (7:8 odds) The correct wire was %s",name,wirecolours[param2-1],wirecolours[wire-1]) else PrintToChatAll("\x01\x04[QuickDefuse] %s chose the correct wire (%s) but the C4 still detonated!",name,wirecolours[param2-1]) } } } } public Event_Abort(Handle:event, const String:name[], bool:dontBroadcast) { new clientId = GetEventInt(event, "userid") new client = GetClientOfUserId(clientId) CancelClientMenu(client) } Report
August 13, 201213 yr comment_113683 Je t'avoue que je ne peux pas t'aider car personnellement je code par des plugins pour Cs:Go pour la simple et bonne raison que je compte pas jouer sur ce jeux ^^" Report
August 15, 201213 yr comment_113997 // Tu hook un event HookEvent("player_spawn", OnPlayerSpawn); // Premier argument = Le nom de l'event // Argument 2 = Le nom de l'event, ces toi qui le choisis } // Quand le joueur respawn public Action:OnPlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast) { // Tu créé un nouveau client new client = GetClientOfUserId(GetEventInt(event, "userid")); // Tu lui envoye une phrase PrintToChat(client, "Vous venez de respawn"); quelle serai l event permetant d afficher un message aleatoirement genre toutes les minute ? Report
August 15, 201213 yr comment_113998 Test de chercher sur fofo sourcemod. PS : Check tes mp max Report
August 16, 201213 yr comment_114035 HookEvent("bomb_planted", onbombplanted); } public Action:Onbombplanted(Handle:event, const String:name[], bool:dontBroadcast) { new client = GetClientOfUserId(GetEventInt(event, "userid")); PrintToChat(client, "Vous venez de poser la bombe"); Report
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.