KᐰMKᐰZΣ Posté(e) le 27 mai 2014 Share Posté(e) le 27 mai 2014 Bonjour Voila mon problème, j ai un serveur surf rpg deathmatch mais quand j augmente ma health au max donc 190 hp elle se remet automatiquement à 100hp dés que je réapparais après être mort. Bien que je mette ça dans le fichier cssdm.equip.txt dans cfg/cssdm/cssdm.equip.txt: "AutoItems" { // Health amount to give (0 to use default from game/other plugin) // "health" "0" Avez vous une solution svp Merci Cordialement "KᐰM!KᐰZΣ" Citer Lien vers le commentaire Partager sur d’autres sites More sharing options...
WilyVampyre Posté(e) le 16 juin 2014 Share Posté(e) le 16 juin 2014 C'est à cause du SpawnProtect ! Il faut que tu le désactive ! Citer Lien vers le commentaire Partager sur d’autres sites More sharing options...
KᐰMKᐰZΣ Posté(e) le 16 juin 2014 Auteur Share Posté(e) le 16 juin 2014 ok merci Citer Lien vers le commentaire Partager sur d’autres sites More sharing options...
kupah Posté(e) le 16 juin 2014 Share Posté(e) le 16 juin 2014 #include <sourcemod> #pragma semicolon 1 new Handle:cvarSpawnProtect; new Handle:cvarAnnounce; new Handle:cvarProtectTime; new clientProtected[MAXPLAYERS+1]; new clientHP[MAXPLAYERS+1]; //Chat Color Defines #define cDefault 0x01 #define cLightGreen 0x03 #define cGreen 0x04 #define cDarkGreen 0x05 #define PLUGIN_VERSION "1.0.0" public Plugin:myinfo = { name = "TF2 Spawn Protection", author = "Crimson", description = "Protects Player's on Spawn", version = PLUGIN_VERSION, url = "www.tf2rocketarena.com" } public OnPluginStart() { CreateConVar("sm_spawnprotect_version", PLUGIN_VERSION, "Spawn Protection Version", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY); cvarSpawnProtect = CreateConVar("sm_spawnprotect_enable", "1.0", "Activer/Desactiver le plugin", FCVAR_PLUGIN, true, 0.0, true, 1.0); cvarAnnounce = CreateConVar("sm_spawnprotect_announce", "1.0", "Activer/Desactiver l'annonce de la protection", FCVAR_PLUGIN, true, 0.0, true, 1.0); cvarProtectTime = CreateConVar("sm_spawnprotect_timer", "5.0", "Nombre de seconde du spawn protect", FCVAR_PLUGIN, true, 0.0, true, 30.0); HookEvent("player_spawn", Event_PlayerSpawn); HookEvent("player_hurt", Event_PlayerHurt); } public Event_PlayerSpawn(Handle:event,const String:name[],bool:dontBroadcast) { if (GetConVarFloat(cvarSpawnProtect)) { new client = GetClientOfUserId(GetEventInt(event, "userid")); CreateTimer(0.1, timer_GetHealth, client); //Enable Protection on the Client clientProtected[client] = 1; SetEntityRenderMode(client, RENDER_TRANSCOLOR); SetEntityRenderColor(client, 0, 0, 205, 100); CreateTimer(GetConVarFloat(cvarProtectTime), timer_PlayerProtect, client); } } public Action:timer_GetHealth(Handle:timer, any:client) { //Get the Player's Health on Spawning if(IsClientConnected(client) && IsClientInGame(client)) { clientHP[client] = GetClientHealth(client); } } public Action:timer_PlayerProtect(Handle:timer, any:client) { //Disable Protection on the Client clientProtected[client] = false; SetEntityRenderColor(client, 255, 255, 255, 255); if (GetConVarFloat(cvarAnnounce)) PrintToChat(client, "%c[spawnProtect] %cVotre protection est maintenant desactiver", cLightGreen, cDefault); } public Event_PlayerHurt(Handle:event,const String:name[],bool:dontBroadcast) { new client = GetClientOfUserId(GetEventInt(event, "userid")); if (clientProtected[client] == 1) { SetEntData(client, FindDataMapOffs(client, "m_iMaxHealth"), clientHP[client], 4, true); SetEntData(client, FindDataMapOffs(client, "m_iHealth"), clientHP[client], 4, true); } } met celui-ci a la place il marchera avec normalement Citer Lien vers le commentaire Partager sur d’autres sites More sharing options...
KᐰMKᐰZΣ Posté(e) le 19 juin 2014 Auteur Share Posté(e) le 19 juin 2014 Dans quel fichier je dois le mettre ? svp Citer Lien vers le commentaire Partager sur d’autres sites More sharing options...
realtongeren Posté(e) le 19 juin 2014 Share Posté(e) le 19 juin 2014 Dans quel fichier je dois le mettre ? svp tu copie ici http://www.sourcemod.net/compiler.php et tu compile ensuite tu mes le .smx dans plugins Citer Lien vers le commentaire Partager sur d’autres sites More sharing options...
KᐰMKᐰZΣ Posté(e) le 19 juin 2014 Auteur Share Posté(e) le 19 juin 2014 désolé je l ai remplacé mais il me remet les hp par défaut 100HP Citer Lien vers le commentaire Partager sur d’autres sites More sharing options...
Messages recommandés
Rejoindre la conversation
Vous pouvez publier maintenant et vous inscrire plus tard. Si vous avez un compte, connectez-vous maintenant pour publier avec votre compte.