Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new pNoReloadTimer[MAX_PLAYERS] = {-1, ...};
- public OnPlayerDisconnect(playerid)
- {
- if (pNoReloadTimer[playerid] != -1)
- {
- KillTimer(pNoReloadTimer[playerid]);
- pNoReloadTimer[playerid] = -1;
- }
- return 1;
- }
- CMD:noreload(playerid, params[])
- {
- if (IsPlayerConnected(playerid))
- {
- if (PlayerInfo[playerid][pAdmin] >= 3)
- {
- if (pNoReloadTimer[playerid] != -1) SendClientMessage(playerid, COLOR_FAILED, "No reload mode already enabled!");
- else
- {
- pNoReloadTimer[playerid] = SetTimerEx("NoReload", 250, 1, "d", playerid);
- SendClientMessage(playerid, COLOR_SUCCESS, "No reload mode has been enabled!");
- }
- }
- else SendClientMessage(playerid, COLOR_CORRECTION, "You are not authorized to use this command !");
- }
- }
- forward NoReload(playerid);
- public NoReload(playerid)
- {
- GivePlayerWeapon(playerid, GetPlayerWeapon(playerid), 10);
- }
Advertisement
Add Comment
Please, Sign In to add comment