Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* ===[INCLUDES]=== */
- #include <a_samp>
- /* ===[DEFINES]=== */
- #define COLOR_GREEN 0x33AA33AA
- #define COLOR_RED 0xFF0000AA
- /* ===[VARIABLES]=== */
- new pClip[MAX_PLAYERS];
- /* ===[CALLBACKS]=== */
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print("NoClip by Mike - Loaded");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("\n--------------------------------------");
- print("NoClip by Mike - Unloaded");
- print("--------------------------------------\n");
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- pClip[playerid] = 0;
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/noclip", cmdtext, true) == 0)
- {
- if(pClip[playerid] == 0)
- {
- pClip[playerid] = 1;
- SendClientMessage(playerid,COLOR_GREEN,"No-clip on!");
- }
- else
- {
- pClip[playerid] = 0;
- SendClientMessage(playerid,COLOR_RED,"No-clip off!");
- }
- return 1;
- }
- return 0;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if (newkeys & KEY_FIRE && DoesPlayerHaveLauncher(playerid) && pClip[playerid] == 1)
- {
- new type;
- type = GetPlayerWeapon(playerid);
- if(type == 35) GivePlayerWeapon(playerid,35,1000);
- if(type == 36) GivePlayerWeapon(playerid,36,1000);
- }
- return 1;
- }
- stock DoesPlayerHaveLauncher(playerid)
- {
- new pWep;
- pWep = GetPlayerWeapon(playerid);
- if(pWep == 35 || pWep == 36)
- {
- return 1;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement