[FilterScript] Full Weapon Set[My first FS]
#1

Hey my first FS , I dont even know if thats filterscript if not sry I upload but anyway :

This is not system just admins command : to give to himself or playerid an full weapon set:

Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT

#include <a_samp>
#include <ZCMD>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Full Weapons Set by PFG-RP");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}
CMD:giveplayerfullset(playerid, params[])
{
	new giveplayerid;
    {
		GivePlayerWeapon(giveplayerid, 24, 60000);
		GivePlayerWeapon(giveplayerid, 29, 60000);
		GivePlayerWeapon(giveplayerid, 31, 60000);
        GivePlayerWeapon(giveplayerid, 30, 60000);
		GivePlayerWeapon(giveplayerid, 25, 60000);
		GivePlayerWeapon(giveplayerid, 33, 60000);
		SetPlayerHealth(giveplayerid, 100.0);
		SetPlayerArmour(giveplayerid, 100.0);
        }
	return 1;
}

CMD:givemefullset(playerid, params[])
               {
				GivePlayerWeapon(playerid, 24, 60000);
				GivePlayerWeapon(playerid, 29, 60000);
				GivePlayerWeapon(playerid, 31, 60000);
			    GivePlayerWeapon(playerid, 30, 60000);
				GivePlayerWeapon(playerid, 25, 60000);
				GivePlayerWeapon(playerid, 33, 60000);
				SetPlayerHealth(playerid, 100.0);
				SetPlayerArmour(playerid, 100.0);
				}
	return 1;
}

#endif
Reply
#2

Not so good indentation!
Reply
#3

Fair for a first attempt
Fix your indentations
Reply
#4

Ok guys ty anyway.
Reply
#5

For first attempt its not bad.
Reply
#6

bad this fs dont work!
Reply
#7

Why not sir ?
Reply
#8

this looks like u copied the script, because of the indentation :/
Reply
#9

You must change this:
Код:
CMD:giveplayerfullset(playerid, params[])
{
	new giveplayerid;
    {
		GivePlayerWeapon(giveplayerid, 24, 60000);
		GivePlayerWeapon(giveplayerid, 29, 60000);
		GivePlayerWeapon(giveplayerid, 31, 60000);
        GivePlayerWeapon(giveplayerid, 30, 60000);
		GivePlayerWeapon(giveplayerid, 25, 60000);
		GivePlayerWeapon(giveplayerid, 33, 60000);
		SetPlayerHealth(giveplayerid, 100.0);
		SetPlayerArmour(giveplayerid, 100.0);
        }
	return 1;
}
becouse it's only give set for playerid who have id = 0,
try this:
Код:
CMD:giveplayerfullset(playerid, params[])
{
        new giveplayerid = strval(params);
	GivePlayerWeapon(giveplayerid, 24, 60000);
	GivePlayerWeapon(giveplayerid, 29, 60000);
	GivePlayerWeapon(giveplayerid, 31, 60000);
        GivePlayerWeapon(giveplayerid, 30, 60000);
	GivePlayerWeapon(giveplayerid, 25, 60000);
	GivePlayerWeapon(giveplayerid, 33, 60000);
	SetPlayerHealth(giveplayerid, 100.0);
	SetPlayerArmour(giveplayerid, 100.0);
	return 1;
}
Reply
#10

Oh and first I did not copy that sir. and ty I'll fix it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)