SA-MP Forums Archive
[FilterScript] Simple, Godmode or Weapons. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Simple, Godmode or Weapons. (/showthread.php?tid=402668)



Simple, Godmode or Weapons. - qkac1234 - 27.12.2012

This is my first FS. I hope you will like it.

cmds:
/weaponon
/weaponoff

Код:
// made by Qkac , special thanks to samp wiki :)
#include <a_samp>
#include <zcmd>
	COMMAND:weaponon(playerid, params[])
{
 SendClientMessage(playerid,  0xFFFFFFFF,"Weapons loaded.");
 GivePlayerWeapon(playerid, 26, 500); //shotgun
 GivePlayerWeapon(playerid, 24, 500); //pistol
 GivePlayerWeapon(playerid, 29, 500); //mp5
 SetPlayerHealth (playerid,100.0);
 return 1;
}
COMMAND:weaponoff(playerid, params[])
{
 #define INFINITY	(Float:0x7F800000)
 SendClientMessage(playerid,  0xFFFFFFFF,"Godmode has been actived. Now, you cant use weapons.");
 ResetPlayerWeapons(playerid);
 SetPlayerHealth (playerid,INFINITY);
 return 1;
}



Re: Simple, Godmode or Weapons. - Justin Reif - 27.12.2012

Simple


Re: Simple, Godmode or Weapons. - [HiC]TheKiller - 27.12.2012

It's not a bad little snippet for your first but you don't use the sscanf include in the code .


Re: Simple, Godmode or Weapons. - qkac1234 - 12.01.2013

Oh, u right! I've fixed it.