Where i can put this code
#1

Where i can put this code

Код:
for(new idx=1; idx<MAX_BIZ; idx++)
	{
		if(IsPlayerInRangeOfPoint(playerid, 2, BizInfo[idx][bX], BizInfo[idx][bY], BizInfo[idx][bZ]))
		{
		    if(!BizInfo[idx][bStatus] && PlayerInfo[playerid][pBiz] != idx && !PlayerInfo[playerid][pVBiz]) return SendClientMessage(playerid, COLOR_GREY, "This business is closed.");
		    if(BizInfo[idx][bType] == 1) // 24/7 Business
		    {
		        format(string, sizeof(string), "* %s pushes the door and enters the shop.", RPN(playerid));
				ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
		        SetPlayerPos(playerid, -25.884498,-185.868988,1003.546875);
		        SetPlayerFacingAngle(playerid, 357.5915);
		        SetCameraBehindPlayer(playerid);
		        SetPlayerInterior(playerid, 17);
		        SetPlayerVirtualWorld(playerid, idx+6000);
		        format(string, sizeof(string), "** Welcome to %s's 24/7 Market (( /buy )) **", BizInfo[idx][bOwner]);
		        SendClientMessage(playerid, COLOR_ORANGE, string);
		        return 1;
		    }
		    else if(BizInfo[idx][bType] == 2) // Clothes Shop Business
		    {
		        format(string, sizeof(string), "* %s pushes the door and enters the clothes shop.", RPN(playerid));
				ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
		        SetPlayerPos(playerid, 226.293991,-7.431529,1002.210937);
		        SetPlayerFacingAngle(playerid, 356.3849);
		        SetCameraBehindPlayer(playerid);
		        SetPlayerInterior(playerid, 5);
		        SetPlayerVirtualWorld(playerid, idx+6000);
		        format(string, sizeof(string), "** Welcome to %s's Clothes Shop (( /buyclothes & /buytoys )) **", BizInfo[idx][bOwner]);
		        SendClientMessage(playerid, COLOR_ORANGE, string);
		        return 1;
		    }
		    else if(BizInfo[idx][bType] == 3) // Ammunation Business
		    {
		        format(string, sizeof(string), "* %s pushes the door and enters the ammunation.", RPN(playerid));
				ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
		        SetPlayerPos(playerid, 314.820983,-141.431991,999.601562);
		        SetPlayerFacingAngle(playerid, 358.9898);
		        SetCameraBehindPlayer(playerid);
		        SetPlayerInterior(playerid, 7);
		        SetPlayerVirtualWorld(playerid, idx+6000);
		        return 1;
		    }
		    else if(BizInfo[idx][bType] == 4) // Well stacked pizza
		    {
		        format(string, sizeof(string), "* %s pushes the door and enters the well stacked pizza.", RPN(playerid));
				ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
		        SetPlayerPos(playerid, 372.3329,-131.9212,1001.499511);
		        SetPlayerFacingAngle(playerid, 0.1316);
		        format(string, sizeof(string), "** Welcome to %s's Well stacked pizza (( /buyfood )) **", BizInfo[idx][bOwner]);
		        SendClientMessage(playerid, COLOR_ORANGE, string);
		        SetCameraBehindPlayer(playerid);
		        SetPlayerInterior(playerid, 5);
		        SetPlayerVirtualWorld(playerid, idx+6000);
		        return 1;
		    }
		    else if(BizInfo[idx][bType] == 5) // Gas Station
		    {
		        format(string, sizeof(string), "* %s pushes the door and enters the gas station.", RPN(playerid));
				ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
		        SetPlayerPos(playerid, -30.946699,-89.609596,1003.546875);
		        SetPlayerFacingAngle(playerid, 0.4216);
	         	format(string, sizeof(string), "** Welcome to %s's Gas Station (( /buy )) **", BizInfo[idx][bOwner]);
		        SendClientMessage(playerid, COLOR_ORANGE, string);
		        SetCameraBehindPlayer(playerid);
		        SetPlayerInterior(playerid, 18);
		        SetPlayerVirtualWorld(playerid, idx+6000);
		        return 1;
		    }
		    else if(BizInfo[idx][bType] == 6) // Burger Shot
		    {
		        format(string, sizeof(string), "* %s pushes the door and enters the burger shot.", RPN(playerid));
				ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
		        SetPlayerPos(playerid, 363.5979,-74.4754,1001.507812);
		        SetPlayerFacingAngle(playerid, 309.6378);
                format(string, sizeof(string), "** Welcome to %s's Burger Shot (( /buyfood )) **", BizInfo[idx][bOwner]);
                SendClientMessage(playerid, COLOR_ORANGE, string);
		        SetCameraBehindPlayer(playerid);
		        SetPlayerInterior(playerid, 10);
		        SetPlayerVirtualWorld(playerid, idx+6000);
		        return 1;
		    }
		     else if(BizInfo[idx][bType] == 7) // Sex Shop
		    {
		        format(string, sizeof(string), "* %s pushes the door and enters the shop.", RPN(playerid));
				ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
		        SetPlayerPos(playerid, -103.559165,-24.225606,1000.718750);
		        SetPlayerFacingAngle(playerid, 0.4216);
		        SetCameraBehindPlayer(playerid);
		        SetPlayerInterior(playerid, 3);
		        SetPlayerVirtualWorld(playerid, idx+6000);
		        return 1;
		    }
		}
	}
Quote:

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

#include <a_samp>

#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()
{
// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}

public OnGameModeExit()
{
return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}

public OnPlayerConnect(playerid)
{
return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
return 1;
}

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;
}

Reply


Messages In This Thread
Where i can put this code - by Moleex - 15.05.2014, 23:13
Re: Where i can put this code - by Fool - 15.05.2014, 23:14
Re: Where i can put this code - by Moleex - 15.05.2014, 23:16
Re: Where i can put this code - by Lynn - 15.05.2014, 23:19

Forum Jump:


Users browsing this thread: 1 Guest(s)