Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <sourcemod>
- #include <cstrike>
- #include <autoexecconfig>
- Handle timerdelay[MAXPLAYERS+1];
- Handle timerinfini[MAXPLAYERS+1];
- Handle ammo;
- bool possible[MAXPLAYERS+1]={true,...};
- public void OnPluginStart()
- {
- RegConsoleCmd("sm_recharge", infinirecharge);
- }
- public Action infinirecharge(int client, int args)
- {
- if(!possible[client])
- PrintToChat(client, "Cooldown non écoulé");
- else
- {
- ammo = FindConVar("sv_infinite_ammo");
- SendConVarValue(client, ammo, "1");
- timerinfini[client] = CreateTimer(1.0, timercompetence, client);
- timerdelay[client] = CreateTimer(5.0, delay, client);
- }
- }
- public Action timercompetence(Handle timer, int client)
- {
- possible[client]=true;
- }
- public Action delay(Handle timer, int client)
- {
- possible[client]=false;
- ammo = FindConVar("sv_infinite_ammo");
- SendConVarValue(client, ammo, "0");
- PrintToChat(client, "fini");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement