Help with my map
#1

Hello Well, i made a map with MTA, then i convert it to samp... Now i have the code of it on pwn. But i dont know what i have to do now? I want to put it into my game mode, you know the code that bring the pawno.

Код:
// 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;
}
And this is my map:

Код:
CreateObject(3471, 1486.666260, -1750.965942, 15.719852, 359.8963, 0.0000, 90.1369);
CreateObject(3471, 1475.735718, -1751.104736, 15.719852, 359.8963, 0.0000, 90.1369);
CreateObject(966, 1618.505005, -1854.046265, 12.545970, 0.0000, 0.0000, 176.9396);
CreateObject(968, 1618.497314, -1854.300659, 12.915117, 0.0000, 52.4256, 0.0000);
CreateObject(14826, 1608.434204, -1832.847290, 13.272122, 0.0000, 0.0000, 280.1763);
CreateObject(18284, 1652.559692, -1832.574707, 15.494175, 0.0000, 0.0000, 0.0000);
CreateObject(18284, 1652.600830, -1814.237671, 15.486308, 0.0000, 0.0000, 0.0000);
CreateObject(18284, 1606.122681, -1817.330444, 15.404629, 0.0000, 0.0000, 0.0000);
CreateObject(10282, 1601.248413, -1794.362305, 13.395221, 0.0000, 0.0000, 0.0000);
CreateObject(967, 1618.090576, -1855.513184, 12.547045, 0.0000, 0.0000, 269.7592);
CreateObject(8406, 1617.886597, -1862.684448, 18.064423, 0.0000, 0.0000, 0.0000);
CreateObject(1363, 1424.591675, -1621.535156, 13.219175, 0.0000, 0.0000, 0.0000);
CreateObject(1598, 1295.432373, -2660.908447, 5.743093, 0.0000, 0.0000, 0.0000);
CreateObject(1610, 1303.722290, -2666.088623, 6.232962, 0.0000, 0.0000, 0.0000);
CreateObject(1611, 1302.571899, -2667.276367, 5.902435, 0.0000, 0.0000, 0.0000);
CreateObject(1637, 1283.001221, -2646.359131, 5.534249, 0.0000, 0.0000, 290.2820);
CreateObject(1637, 1293.730591, -2673.563965, 4.935566, 0.0000, 0.0000, 290.2820);
CreateObject(2404, 1286.783081, -2645.918213, 6.282956, 0.0000, 0.0000, 0.0000);
CreateObject(2405, 1295.970947, -2670.487549, 5.676255, 338.5141, 0.0000, 212.1768);
CreateObject(2410, 1265.832397, -2661.180908, -0.041921, 0.0000, 0.0000, 0.0000);
CreateObject(6050, 1299.752563, -2640.910400, 9.719568, 0.0000, 0.0000, 203.6870);
CreateObject(6295, 1330.907959, -2699.555664, 30.024330, 0.0000, 0.0000, 104.7473);
Thanks!!
Reply
#2

Put your objects into OnGameModeInit
Reply
#3

Код:
// 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;

	
	CreateObject(3471, 1486.666260, -1750.965942, 15.719852, 359.8963, 0.0000, 90.1369);
	CreateObject(3471, 1475.735718, -1751.104736, 15.719852, 359.8963, 0.0000, 90.1369);
	CreateObject(966, 1618.505005, -1854.046265, 12.545970, 0.0000, 0.0000, 176.9396);
	CreateObject(968, 1618.497314, -1854.300659, 12.915117, 0.0000, 52.4256, 0.0000);
	CreateObject(14826, 1608.434204, -1832.847290, 13.272122, 0.0000, 0.0000, 280.1763);
	CreateObject(18284, 1652.559692, -1832.574707, 15.494175, 0.0000, 0.0000, 0.0000);
	CreateObject(18284, 1652.600830, -1814.237671, 15.486308, 0.0000, 0.0000, 0.0000);
	CreateObject(18284, 1606.122681, -1817.330444, 15.404629, 0.0000, 0.0000, 0.0000);
	CreateObject(10282, 1601.248413, -1794.362305, 13.395221, 0.0000, 0.0000, 0.0000);
	CreateObject(967, 1618.090576, -1855.513184, 12.547045, 0.0000, 0.0000, 269.7592);
	CreateObject(8406, 1617.886597, -1862.684448, 18.064423, 0.0000, 0.0000, 0.0000);
	CreateObject(1363, 1424.591675, -1621.535156, 13.219175, 0.0000, 0.0000, 0.0000);
	CreateObject(1598, 1295.432373, -2660.908447, 5.743093, 0.0000, 0.0000, 0.0000);
	CreateObject(1610, 1303.722290, -2666.088623, 6.232962, 0.0000, 0.0000, 0.0000);
	CreateObject(1611, 1302.571899, -2667.276367, 5.902435, 0.0000, 0.0000, 0.0000);
	CreateObject(1637, 1283.001221, -2646.359131, 5.534249, 0.0000, 0.0000, 290.2820);
	CreateObject(1637, 1293.730591, -2673.563965, 4.935566, 0.0000, 0.0000, 290.2820);
	CreateObject(2404, 1286.783081, -2645.918213, 6.282956, 0.0000, 0.0000, 0.0000);
	CreateObject(2405, 1295.970947, -2670.487549, 5.676255, 338.5141, 0.0000, 212.1768);
	CreateObject(2410, 1265.832397, -2661.180908, -0.041921, 0.0000, 0.0000, 0.0000);
	CreateObject(6050, 1299.752563, -2640.910400, 9.719568, 0.0000, 0.0000, 203.6870);
	CreateObject(6295, 1330.907959, -2699.555664, 30.024330, 0.0000, 0.0000, 104.7473);




}

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


Forum Jump:


Users browsing this thread: 1 Guest(s)