Help in FS WeaponLicense
#1

Hey I've made a Weapon License system will be good to my script and I dont find any Defines I should to add and the COmmand doesnt work in server check it please :


Код:
// 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(" By Yarin0600 - WeaponLicenseSystem");
	print("--------------------------------------\n");
	return 1;
}


CMD:giveweaponlicense(playerid, params[])
{
	if(IsACop(playerid)
	{
		new string[128], giveplayerid, type;
		if(sscanf(params, "ud", giveplayerid, type))
		{
			SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /givelicense [playerid] [type]");
			SendClientMessageEx(playerid, COLOR_GRAD2, "Types: 1 = Weapon
			return 1;
		}

		if(!IsPlayerConnected(giveplayerid))
		{
			SendClientMessageEx(playerid, COLOR_GRAD2, "Invalid player specified.");
			return 1;
		}
		new year, month, day, hour, minute, second;

		switch(type)
		{

			case 1:
			{
				if(PlayerInfo[giveplayerid][pWeaponLicense] == 1)
				{
					SendClientMessageEx(playerid, COLOR_GRAD2, "This player already has a weapon license.");
					return 1;
				}
				format(string, sizeof(string), "You have given a weapon license to %s.",GetPlayerNameEx(giveplayerid));
				SendClientMessageEx(playerid, COLOR_WHITE, string);
				format(string, sizeof(string), "The Officer %s has given you a weapon license.",GetPlayerNameEx(playerid));
				SendClientMessageEx(giveplayerid, COLOR_WHITE, string);
				gettime(hour,minute,second);
				getdate(year,month,day);
				format(string, sizeof(string), "[%d/%d/%d][%d:%d:%d] Officer %s has given a weapon license to %s.",day,month,year,hour,minute,second,GetPlayerNameEx(playerid),GetPlayerNameEx(giveplayerid));
				Log("logs/licenses.log", string);
				PlayerInfo[giveplayerid][pWeaponLicense] = 1;
				return 1;
			}

public OnFilterScriptExit()
{
	return 1;
}


#endif
Reply


Messages In This Thread
Help in FS WeaponLicense - by yaron0600 - 01.04.2013, 15:31
Re: Help in FS WeaponLicense - by ACI - 01.04.2013, 15:44
Re: Help in FS WeaponLicense - by SuperViper - 01.04.2013, 15:44
Re: Help in FS WeaponLicense - by yaron0600 - 01.04.2013, 15:53

Forum Jump:


Users browsing this thread: 1 Guest(s)