Few Errors'
#8

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

#include <a_samp>
#include <zcmd>
//-----------------[ Color Defines ]---------------//


#define COLOR_GREEN 0x008000FF
#define COLOR_BLUE 0x0000FFFF
#define COLOR_BRIGHTRED 0xFF000AAA
#define COLOR_AQUA 0x00FFFFAA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_BEIGE 0xFFF8DCAA
#define COLOR_BLACK 0x000000AA
#define COLOR_LIGHTERBLUE 0x00BFFFAA
#define COLOR_BLUELIGHT 0x1E90FFAA
#define COLOR_BLUEMEDIUM 0x0000CDAA
#define COLOR_BLUEDARK 0x00008BAA
#define COLOR_PINK 0xFF1493AA
#define COLOR_PINKDARK 0xFF00FFAA
#define COLOR_GREENLIGHT 0x00FF00AA
#define COLOR_GREENDARK 0x006400AA
#define COLOR_MAROON 0x800000AA
#define COLOR_OKER 0x808000AA
#define COLOR_ORANGE 0xFF4500AA
#define COLOR_ORANGELIGHT 0xFF8C00AA
#define COLOR_PURPLE 0x800080AA
#define COLOR_VIOLETDARK 0x9400D3AA
#define COLOR_INDIGO 0xAB0082AA
#define COLOR_RED 0xFF0000AA
#define COLOR_SAND 0xFFDEADAA
#define COLOR_SILVER 0xC0C0C0AA
#define COLOR_TEAL 0x008080AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_GOLD 0xFFD700AA
#define COLOR_BROWN 0x8B4513AA
#define COLOR_BROWNLIGHT 0xA0522DAA
#define COLOR_GRAY 0xA9A9A9AA
#define COLOR_GRAYDARK 0x696969AA
#define COLOR_INVISIBLE 0xFFFFFF00

//-----------------[ End Of Color Defines ]---------------//

new pAFK[MAX_PLAYERS] = 0;
#define pAFK [MAX_PLAYERS]







#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Blank Filterscript by your name here");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

#else

main()
{
	print("\n----------------------------------");
	print(" Blank Gamemode by your name here");
	print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
	return 1;
}

public OnGameModeExit()
{
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
	return 1;
}
public OnPlayerConnect(playerid)
{
        pAFK[MAX_PLAYERS] = 0;
        return 1;
}
CMD:afk(playerid,params[])
    {
        if(Pafk[playerid] == 1)
        {
            SendClientMessage(playerid, COLOR_BLUE, "You are already AFK! As you typed this, it means you are back!");
			SetPlayerVirtualWorld(playerid, 0);
			pAFK[playerid] == 0;
        }
        else if(Pafk[playerid] == 0)
        {
            SendClientMessage(playerid, COLOR_RED, "You are now AFK!");
			SetPlayerHealth(playerid, 99999999);
			SetPlayerVirtualWorld(playerid, 69696969);
			pAFK[playerid] == 1;
        }
        return 1;
    }
CMD:back(playerid,params[])
    {
        if(pAFK[playerid] == 0)
        {
            SendClientMessage(playerid, COLOR_RED, "You are not even AFK!!");
        }
        else if(pAFK[playerid] == 1)
        {
            pAFK[playerid] == 0;
            SetPlayerVirtualWorld(playerid, 0);
			SetPlayerHealth(playerid, 100);
			SendClientMessage(playerid, COLOR_BLUE, "You are now back");
        }
        return 1;
    }
    return 0;
}
CMD:m4(playerid,params[])
{
	SendClientMessage(playerid,COLOR_GOLD,"You have bought an M4 for 1000$");
	GivePlayerWeapon(playerid,31,99999);
	GivePlayerMoney(playerid,-1000);
	return 1;
}
CMD:deagle(playerid,params[])
{
	SendClientMessage(playerid,COLOR_GOLD,"you have bought a Deagle for 1000$");
	GivePlayerWeapon(playerid,24,99999);
	GivePlayerMoney(playerid,-1000);
	return 1;
}
CMD:ak47(playerid,params[])
{
	SendClientMessage(playerid,COLOR_GOLD,"You have bought an AK47 for 1000$");
	GivePlayerWeapon(playerid,30,9999);
	GivePlayerMoney(playerid,-1000);
	return 1;
}
CMD:sniper(playerid,params[])
{
	SendClientMessage(playerid,COLOR_GOLD,"You have bought an Sniper for 1000$");
	GivePlayerWeapon(playerid,34,9999);
	GivePlayerMoney(playerid,-1000);
	return 1;
}
CMD:knife(playerid,params[])
{
	SendClientMessage(playerid,COLOR_GOLD,"You have bought an knife for 1000$");
	GivePlayerWeapon(playerid,4,9999);
	GivePlayerMoney(playerid,-1000);
	return 1;
}
CMD:spas(playerid,params[])
{
	SendClientMessage(playerid,COLOR_GOLD,"You have bought an spas-12 for 1000$");
	GivePlayerWeapon(playerid,27,9999);
	GivePlayerMoney(playerid,-1000);
	return 1;
}
CMD:mp5(playerid,params[])
{
	SendClientMessage(playerid,COLOR_GOLD,"You have bought an MP5 for 1000$");
	GivePlayerWeapon(playerid,29,9999);
	GivePlayerMoney(playerid,-1000);
	return 1;
}
CMD:sawnoff(playerid,params[])
{
	SendClientMessage(playerid,COLOR_GOLD,"You have bought an sawnoff shotgun for 1000$");
	GivePlayerWeapon(playerid,26,9999);
	GivePlayerMoney(playerid,-1000);
	return 1;
}
CMD:parachute(playerid,params[])
{
	SendClientMessage(playerid,COLOR_GOLD,"You have bought a parachute for 100$");
	GivePlayerWeapon(playerid,46,9999);
	GivePlayerMoney(playerid,-100);
	return 1;
}
CMD:Commands(playerid,params[])
{
	SendClientMessage(playerid,COLOR_RED,"Need to go AFK? Just use /afk, noone will be able to kill you or shoot you! Remember! To come back use /Back!!");
	SendClientMessage(playerid,COLOR_RED,"Want weapons? Use /parachute /sawnoff /mp5 /spas /knife /sniper /ak47 /dealge and /m4");
	SendClientMessage(playerid,COLOR_RED,"To refill your armour use /Armourme and to refill your health use /healme, you have to pay 1000 For each one");
	return 1;
}
//Dividing Bar
CMD:healme(playerid,params[])
{
	SendClientMessage(playerid,COLOR_RED,"You have refilled your health for 1000 dollars!");
	SetPlayerHealth(playerid,100);
	GivePlayerMoney(playerid,-1000);
	SendClientMessage(playerid,COLOR_BLUE,"Use /Commands for more information about this system");
	return 1;
}
//Diving Bar
CMD:armourme(playerid,params[])
{
	SendClientMessage(playerid,COLOR_RED,"You have refilled your armour for 1000 dollars!");
	SetPlayerArmour(playerid,100);
	GivePlayerMoney(playerid,-1000);
	SendClientMessage(playerid,COLOR_BLUE,"Use /Commands for more information about this sytem");
	return 1;
}
	return 1;

public OnPlayerDisconnect(playerid)
{
    pAFK[playerid] = 0;
}

public OnPlayerSpawn(playerid)
{
	return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
	return 1;
}

public OnVehicleSpawn(vehicleid)
{
	return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
	return 1;
}

public OnPlayerText(playerid, text[])
{
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/mycommand", cmdtext, true, 10) == 0)
	{
		// Do something here
		return 1;
	}
	return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
	return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
	return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
	return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
	return 1;
}

public OnRconCommand(cmd[])
{
	return 1;
}

public OnPlayerRequestSpawn(playerid)
{
	return 1;
}

public OnObjectMoved(objectid)
{
	return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
	return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
	return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
	return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
	return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
	return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
	return 1;
}

public OnPlayerExitedMenu(playerid)
{
	return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
	return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
	return 1;
}

public OnPlayerUpdate(playerid)
{
	return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
	return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
	return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
	return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
	return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
	return 1;
}
#endif
Reply


Messages In This Thread
Few Errors' - by Yamakei - 26.10.2012, 21:22
Re: Few Errors' - by gtakillerIV - 26.10.2012, 21:57
Re: Few Errors' - by Yamakei - 26.10.2012, 22:02
Re: Few Errors' - by gtakillerIV - 26.10.2012, 22:04
Re: Few Errors' - by Yamakei - 26.10.2012, 22:05
Re: Few Errors' - by Yamakei - 27.10.2012, 00:07
Re: Few Errors' - by JaKe Elite - 27.10.2012, 01:32
Re: Few Errors' - by Yamakei - 27.10.2012, 01:39
Re: Few Errors' - by JaKe Elite - 27.10.2012, 01:51
Re: Few Errors' - by Yamakei - 27.10.2012, 02:08

Forum Jump:


Users browsing this thread: 2 Guest(s)