Jump to content
View in the app

A better way to browse. Learn more.

Forum Supreme-Elite

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Salut,

 

Je m'entraine à crée des Timer dans mes plugins histoire de les maitrisés.

Donc j'ai crée un petit Auto Give Cash.

 

Que fais t-il ?

 

Toute les X secondes, il donne de l'argent.

--> L'argent est modifiable.

--> Le temps aussi

Un advert s'affiche, pour ne pas flooder le chat :

--> Vous pouvez l'activer et le désactiver.

Devant l'advert il y à un prefix:

--> Il est modifiable.

 

À compiler bien sure, mais il y à l'include colors.

Enfin la compilation en local ne devrais pas causé de problèmes.

 

Si il doit pourrir sur mon ordinateur, je préfère le partager malgré que il est minuscule.

 

Kriax.

 

#include <sourcemod>
#include <colors>
#include <sdktools>
#include <cstrike>

#pragma semicolon 1

new Handle:g_iMoney = INVALID_HANDLE;
new iMoney = 0;

new Handle:Active_Advert = INVALID_HANDLE;
new Advert =0;

new Handle:Advert_TagTeam = INVALID_HANDLE;
new String:TagTeam[64];

new Handle:Give_Time;
new Handle:Give_Timer;

#define VERSION "1.0"

public Plugin:myinfo =
{
name = "Auto Give Cash",
author = "Kriax",
description = "Donne du cash à tout le monde automatiquement",
version = VERSION,
url = "",
};

public OnPluginStart()
{	
Give_Time = CreateConVar("sm_time", "10.0", "Après combien de secondes l'argent est donner");
Give_Timer = CreateTimer(GetConVarFloat(Give_Time), GiveCash, _, TIMER_REPEAT);

g_iMoney = CreateConVar( "sm_money", "16000", "Quantité d'argent donner");

Active_Advert = CreateConVar( "sm_advert", "1", "Active l'advert d'information !");
Advert_TagTeam = CreateConVar( "sm_tagteam", "[Auto-Cash]", "Préfix qui s'afficheras dans vos phrases automatiques");

AutoExecConfig(true, "auto_give_cash");

HookConVarChange(Give_Time, Give_Time_Inerval);
}

public OnConfigsExecuted()
{
Advert = GetConVarInt(Active_Advert);
iMoney = GetConVarInt(g_iMoney);
GetConVarString(Advert_TagTeam, TagTeam, sizeof(TagTeam));
}

public Give_Time_Inerval(Handle:convar, const String:oldValue[], const String:newValue[])
{
KillTimer(Give_Timer);

Give_Timer = CreateTimer(GetConVarFloat(Give_Time), GiveCash, _, TIMER_REPEAT);
}

public Action:GiveCash(Handle:timer)
{
for(new client = 1; client <= MaxClients;client++)
{
	if (IsClientInGame(client) && IsPlayerAlive(client) && GetClientTeam(client) > 1 && ADMFLAG_CUSTOM1)
	{
		if (g_iMoney != INVALID_HANDLE)
		SetEntProp(client, Prop_Send, "m_iAccount", iMoney);
		if (Advert == 1)
		{
			CPrintToChat( client, "{green}%s {lightgreen}Vous avez reçus votre argent.", TagTeam);
		}
	}
}
}

C'est bien ça, c'est utile dans le RP.

ça te tente de crée des menus de ventes d'armes + les métiers associés avec ?

  • Author

Heuu... Nan xD

 

Je pense ne pas avoir les compétances pour ^^"

 

Et je suis occuper par mes autres plugins :)

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...

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.