SA-MP Forums Archive
CreateObject or CreateActor. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: CreateObject or CreateActor. (/showthread.php?tid=624118)



CreateObject or CreateActor. - aymane123 - 11.12.2016

i am mapping a new map and i have to put some guys as bodyguards (there are like bots but they dont take damage and the dont move) so i puted them as object on my map while mapping with map editor when i test it with CreateObject it shows me just a piece of meat should i make it CreateActor. And i have problem while loading the map too the map script is loaded succefully but when i try to join to my local host i dont find my map:
PHP код:
#include <a_samp>
#include <streamer>
#include <a_objects>
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
    print(
"\n--------------------------------------");
    print(
" Blank Filterscript by your name here");
    print(
"--------------------------------------\n");
 
CreateObject(19453294.14050, -1780.060425.13650,   0.000000.00000, -88.43997);
 
CreateObject(19453284.57019, -1780.323005.11829,   0.000000.00000, -87.96001);
 
CreateObject(19453275.07193, -1780.592905.12716,   0.000000.00000, -89.10004);
 
CreateObject(19453270.53458, -1785.474615.11959,   0.000000.000001.98000);
 
CreateObject(19453270.78900, -1794.857425.08769,   0.000000.000001.26000);
 
CreateObject(19453275.77609, -1799.554695.06847,   0.000000.00000, -88.56002);
 
CreateObject(19392282.11862, -1799.408205.05309,   0.000000.00000, -87.29999);
 
CreateObject(19453288.34933, -1799.174685.10903,   0.000000.00000, -88.62000);
 
CreateObject(1502281.37140, -1799.477053.32605,   0.000000.000000.00000);
 
CreateObject(19453298.86719, -1784.762825.15234,   0.000000.000000.18000);
 
CreateObject(19453294.10446, -1799.054445.13444,   0.000000.00000, -88.50006);
 
CreateObject(19453298.88300, -1794.126345.15370,   0.000000.000000.00000);
 
CreateObject(19379275.41653, -1785.925423.36435,   0.1200090.06007, -88.79995);
 
CreateObject(19379276.06500, -1794.782843.37056,   -0.3600089.879971.68001);
 
CreateObject(19379285.03958, -1794.052863.34172,   -0.36000, -90.30006, -88.68000);
 
CreateObject(19379285.39731, -1785.214233.36918,   -0.17999, -89.879971.86000);
 
CreateObject(19379293.56131, -1784.830693.37756,   -0.3600089.880070.48000);
 
CreateObject(19453288.81155, -1784.999765.12409,   0.000000.00000, -1.08000);
 
CreateObject(19392288.57800, -1797.464365.11748,   0.000000.000000.00000);
 
CreateObject(19453288.67154, -1791.609015.09485,   0.000000.00000, -0.72000);
 
CreateObject(1502288.62085, -1798.222173.34449,   0.000000.0000090.24004);
 
CreateObject(19361297.26550, -1789.305795.16869,   0.000000.00000, -88.44000);
 
CreateObject(19392294.16968, -1789.387455.21057,   0.000000.0000091.68002);
 
CreateObject(19361291.00314, -1789.430185.20131,   0.000000.00000, -88.74002);
 
CreateObject(19361290.19269, -1789.435675.21033,   0.000000.00000, -89.03999);
 
CreateObject(19379293.61261, -1794.096193.44550,   -0.4200090.179590.00000);
 
CreateObject(2631290.67386, -1790.333743.51412,   0.000000.000001.98000);
 
CreateObject(2627290.51636, -1790.403933.56437,   0.000000.00000, -87.24001);
 
CreateObject(2632290.66669, -1793.746583.52678,   0.000000.000000.00000);
 
CreateObject(2628290.67740, -1793.781493.57609,   0.000000.0000091.08001);
 
CreateObject(11730298.52969, -1789.762943.40174,   0.000000.00000, -91.43997);
 
CreateObject(11730298.51358, -1790.440193.38512,   0.000000.00000, -90.96000);
 
CreateObject(11730298.52332, -1791.123663.38245,   0.000000.00000, -92.10001);
 
CreateObject(2632296.83737, -1797.982183.54180,   0.000000.000001.56000);
 
CreateObject(2631296.85760, -1795.292723.52544,   0.000000.000000.00000);
 
CreateObject(2629296.70154, -1795.307253.56970,   0.000000.00000, -90.65999);
 
CreateObject(2630296.99075, -1798.011843.58667,   0.000000.00000, -89.10002);
 
CreateObject(1550298.52966, -1791.819583.89447,   0.000000.000000.00000);
 
CreateObject(1550298.57605, -1792.331543.83636,   0.000000.000000.00000);
 
CreateObject(1550298.54251, -1792.703983.87137,   0.000000.000000.00000);
 
CreateObject(2632296.92633, -1780.965703.44882,   0.000000.000001.68000);
 
CreateObject(2632292.99768, -1781.087163.44536,   0.000000.000001.74000);
 
CreateObject(2632290.77737, -1781.175293.42988,   0.000000.00000, -178.32011);
 
CreateObject(2632290.90997, -1783.035163.41844,   0.000000.000000.54000);
 
CreateObject(2632290.90878, -1784.912233.45757,   0.000000.000000.24000);
 
CreateObject(2632290.89102, -1786.816163.47300,   0.000000.00000, -0.96000);
 
CreateObject(2632290.81161, -1788.399543.48302,   0.000000.000000.00000);
 
CreateObject(2632294.82220, -1782.905153.45165,   0.000000.000001.80000);
 
CreateObject(2632294.83478, -1784.810553.46223,   0.000000.000002.04000);
 
CreateObject(2632294.82938, -1786.679573.47509,   0.000000.000001.02000);
 
CreateObject(2632294.74127, -1788.447753.48540,   0.000000.000000.18000);
 
CreateObject(2632296.92825, -1782.556523.45228,   0.000000.000000.00000);
 
CreateObject(2632297.78177, -1785.520753.46349,   0.000000.00000, -89.93998);
 
CreateObject(2632296.82788, -1788.352293.48251,   0.000000.00000, -0.06000);
 
CreateObject(14791295.59109, -1783.120615.40945,   0.000000.000000.72000);
 
CreateObject(80294.10403, -1781.224615.26659,   85.8600258.32003, -4.62000);
 
CreateObject(81297.43289, -1784.403935.25087,   85.62012, -131.460160.00000);
 
CreateObject(2630289.89716, -1781.614503.47693,   0.000000.00000, -2.52000);
 
CreateObject(2630291.69507, -1781.607793.49233,   0.000000.000000.00000);
 
CreateObject(2629289.65863, -1784.757693.50545,   0.000000.000000.00000);
 
CreateObject(2629292.09473, -1784.651733.50531,   0.000000.00000, -0.36000);
 
CreateObject(2627290.53421, -1788.047733.53216,   0.000000.00000, -90.95996);
 
CreateObject(2628297.34818, -1787.567383.52885,   0.000000.00000, -90.84001);
 
CreateObject(1502293.39874, -1789.420783.44026,   0.18000, -0.420000.84000);
    return 
1;

and thanks for reading.


Re: CreateObject or CreateActor. - Switch9400 - 11.12.2016

delete
#if defined FILTERSCRIPT


Re: CreateObject or CreateActor. - Switch9400 - 11.12.2016

I do not understand the issue very well, but that this is the correct code
Код:
#include <a_samp>
#include <streamer>

public OnFilterScriptInit()
{
	 CreateDynamicObject(19453, 294.14050, -1780.06042, 5.13650,   0.00000, 0.00000, -88.43997);
	 CreateDynamicObject(19453, 284.57019, -1780.32300, 5.11829,   0.00000, 0.00000, -87.96001);
	 CreateDynamicObject(19453, 275.07193, -1780.59290, 5.12716,   0.00000, 0.00000, -89.10004);
	 CreateDynamicObject(19453, 270.53458, -1785.47461, 5.11959,   0.00000, 0.00000, 1.98000);
	 CreateDynamicObject(19453, 270.78900, -1794.85742, 5.08769,   0.00000, 0.00000, 1.26000);
	 CreateDynamicObject(19453, 275.77609, -1799.55469, 5.06847,   0.00000, 0.00000, -88.56002);
	 CreateDynamicObject(19392, 282.11862, -1799.40820, 5.05309,   0.00000, 0.00000, -87.29999);
	 CreateDynamicObject(19453, 288.34933, -1799.17468, 5.10903,   0.00000, 0.00000, -88.62000);
	 CreateDynamicObject(1502, 281.37140, -1799.47705, 3.32605,   0.00000, 0.00000, 0.00000);
	 CreateDynamicObject(19453, 298.86719, -1784.76282, 5.15234,   0.00000, 0.00000, 0.18000);
	 CreateDynamicObject(19453, 294.10446, -1799.05444, 5.13444,   0.00000, 0.00000, -88.50006);
	 CreateDynamicObject(19453, 298.88300, -1794.12634, 5.15370,   0.00000, 0.00000, 0.00000);
	 CreateDynamicObject(19379, 275.41653, -1785.92542, 3.36435,   0.12000, 90.06007, -88.79995);
	 CreateDynamicObject(19379, 276.06500, -1794.78284, 3.37056,   -0.36000, 89.87997, 1.68001);
	 CreateDynamicObject(19379, 285.03958, -1794.05286, 3.34172,   -0.36000, -90.30006, -88.68000);
	 CreateDynamicObject(19379, 285.39731, -1785.21423, 3.36918,   -0.17999, -89.87997, 1.86000);
	 CreateDynamicObject(19379, 293.56131, -1784.83069, 3.37756,   -0.36000, 89.88007, 0.48000);
	 CreateDynamicObject(19453, 288.81155, -1784.99976, 5.12409,   0.00000, 0.00000, -1.08000);
	 CreateDynamicObject(19392, 288.57800, -1797.46436, 5.11748,   0.00000, 0.00000, 0.00000);
	 CreateDynamicObject(19453, 288.67154, -1791.60901, 5.09485,   0.00000, 0.00000, -0.72000);
	 CreateDynamicObject(1502, 288.62085, -1798.22217, 3.34449,   0.00000, 0.00000, 90.24004);
	 CreateDynamicObject(19361, 297.26550, -1789.30579, 5.16869,   0.00000, 0.00000, -88.44000);
	 CreateDynamicObject(19392, 294.16968, -1789.38745, 5.21057,   0.00000, 0.00000, 91.68002);
	 CreateDynamicObject(19361, 291.00314, -1789.43018, 5.20131,   0.00000, 0.00000, -88.74002);
	 CreateDynamicObject(19361, 290.19269, -1789.43567, 5.21033,   0.00000, 0.00000, -89.03999);
	 CreateDynamicObject(19379, 293.61261, -1794.09619, 3.44550,   -0.42000, 90.17959, 0.00000);
	 CreateDynamicObject(2631, 290.67386, -1790.33374, 3.51412,   0.00000, 0.00000, 1.98000);
	 CreateDynamicObject(2627, 290.51636, -1790.40393, 3.56437,   0.00000, 0.00000, -87.24001);
	 CreateDynamicObject(2632, 290.66669, -1793.74658, 3.52678,   0.00000, 0.00000, 0.00000);
	 CreateDynamicObject(2628, 290.67740, -1793.78149, 3.57609,   0.00000, 0.00000, 91.08001);
	 CreateDynamicObject(11730, 298.52969, -1789.76294, 3.40174,   0.00000, 0.00000, -91.43997);
	 CreateDynamicObject(11730, 298.51358, -1790.44019, 3.38512,   0.00000, 0.00000, -90.96000);
	 CreateDynamicObject(11730, 298.52332, -1791.12366, 3.38245,   0.00000, 0.00000, -92.10001);
	 CreateDynamicObject(2632, 296.83737, -1797.98218, 3.54180,   0.00000, 0.00000, 1.56000);
	 CreateDynamicObject(2631, 296.85760, -1795.29272, 3.52544,   0.00000, 0.00000, 0.00000);
	 CreateDynamicObject(2629, 296.70154, -1795.30725, 3.56970,   0.00000, 0.00000, -90.65999);
	 CreateDynamicObject(2630, 296.99075, -1798.01184, 3.58667,   0.00000, 0.00000, -89.10002);
	 CreateDynamicObject(1550, 298.52966, -1791.81958, 3.89447,   0.00000, 0.00000, 0.00000);
	 CreateDynamicObject(1550, 298.57605, -1792.33154, 3.83636,   0.00000, 0.00000, 0.00000);
	 CreateDynamicObject(1550, 298.54251, -1792.70398, 3.87137,   0.00000, 0.00000, 0.00000);
	 CreateDynamicObject(2632, 296.92633, -1780.96570, 3.44882,   0.00000, 0.00000, 1.68000);
	 CreateDynamicObject(2632, 292.99768, -1781.08716, 3.44536,   0.00000, 0.00000, 1.74000);
	 CreateDynamicObject(2632, 290.77737, -1781.17529, 3.42988,   0.00000, 0.00000, -178.32011);
	 CreateDynamicObject(2632, 290.90997, -1783.03516, 3.41844,   0.00000, 0.00000, 0.54000);
	 CreateDynamicObject(2632, 290.90878, -1784.91223, 3.45757,   0.00000, 0.00000, 0.24000);
	 CreateDynamicObject(2632, 290.89102, -1786.81616, 3.47300,   0.00000, 0.00000, -0.96000);
	 CreateDynamicObject(2632, 290.81161, -1788.39954, 3.48302,   0.00000, 0.00000, 0.00000);
	 CreateDynamicObject(2632, 294.82220, -1782.90515, 3.45165,   0.00000, 0.00000, 1.80000);
	 CreateDynamicObject(2632, 294.83478, -1784.81055, 3.46223,   0.00000, 0.00000, 2.04000);
	 CreateDynamicObject(2632, 294.82938, -1786.67957, 3.47509,   0.00000, 0.00000, 1.02000);
	 CreateDynamicObject(2632, 294.74127, -1788.44775, 3.48540,   0.00000, 0.00000, 0.18000);
	 CreateDynamicObject(2632, 296.92825, -1782.55652, 3.45228,   0.00000, 0.00000, 0.00000);
	 CreateDynamicObject(2632, 297.78177, -1785.52075, 3.46349,   0.00000, 0.00000, -89.93998);
	 CreateDynamicObject(2632, 296.82788, -1788.35229, 3.48251,   0.00000, 0.00000, -0.06000);
	 CreateDynamicObject(14791, 295.59109, -1783.12061, 5.40945,   0.00000, 0.00000, 0.72000);
	 CreateDynamicObject(80, 294.10403, -1781.22461, 5.26659,   85.86002, 58.32003, -4.62000);
	 CreateDynamicObject(81, 297.43289, -1784.40393, 5.25087,   85.62012, -131.46016, 0.00000);
	 CreateDynamicObject(2630, 289.89716, -1781.61450, 3.47693,   0.00000, 0.00000, -2.52000);
	 CreateDynamicObject(2630, 291.69507, -1781.60779, 3.49233,   0.00000, 0.00000, 0.00000);
	 CreateDynamicObject(2629, 289.65863, -1784.75769, 3.50545,   0.00000, 0.00000, 0.00000);
	 CreateDynamicObject(2629, 292.09473, -1784.65173, 3.50531,   0.00000, 0.00000, -0.36000);
	 CreateDynamicObject(2627, 290.53421, -1788.04773, 3.53216,   0.00000, 0.00000, -90.95996);
	 CreateDynamicObject(2628, 297.34818, -1787.56738, 3.52885,   0.00000, 0.00000, -90.84001);
	 CreateDynamicObject(1502, 293.39874, -1789.42078, 3.44026,   0.18000, -0.42000, 0.84000);
	 return 1;
}



Re: CreateObject or CreateActor. - aymane123 - 11.12.2016

Quote:
Originally Posted by aymane123
Посмотреть сообщение
i am mapping a new map and i have to put some guys as bodyguards (there are like bots but they dont take damage and the dont move) so i puted them as object on my map while mapping with map editor when i test it with CreateObject it shows me just a piece of meat should i make it CreateActor.
Thx loading problem fixed but i still have this.


Re: CreateObject or CreateActor. - Switch9400 - 11.12.2016

but what ?


Re: CreateObject or CreateActor. - AnthonyDaBestt - 11.12.2016

PHP код:
new ActorCJ;
 
public 
OnGameModeInit()
{

    
ActorCJ CreateActor(00.00.03.00.0);

put the coords in there.