SA-MP Forums Archive
Help [+rep] - 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: Help [+rep] (/showthread.php?tid=530980)



Help [+rep] - ScorpiusMalfoy - 10.08.2014

I try to create system destroyobject and create object when using command. All work is cool but when using they make crash game, anyone can help me fix dat. Thanks you

stock makeaobject()
{
newbobject[1] = CreateDynamicObject(9530, 1240.20630, -1340.18872, 0.00000, 0.00000, 0.00000, -20.00000);
newbobject[2] = CreateDynamicObject(9530, 1147.01379, -1284.81775, 0.00000, 0.00000, 0.00000, 180.00000);
newbobject[3] = CreateDynamicObject(5794, 1193.99146, -1346.76270, 9.75420, 0.00000, 10.44000, 0.00000);
newbobject[4] = CreateDynamicObject(5794, 1206.71228, -1385.13586, 10.67420, 0.00000, 5.00000, 50.00000);
newbobject[5] = CreateDynamicObject(3865, 1192.35791, -1289.49316, 8.76400, 0.00000, 0.00000, 0.00000);
newbobject[6] = CreateDynamicObject(9530, 1145.88892, -1264.81226, 0.00000, 0.00000, 0.00000, 90.00000);
newbobject[7] = CreateDynamicObject(7916, 1189.33411, -1299.21692, 7.49870, 0.00000, 0.00000, 0.00000);
newbobject[8] = CreateDynamicObject(3865, 1201.29492, -1286.94983, 9.52400, 0.00000, 0.00000, 10.00000);
newbobject[9] = CreateDynamicObject(3865, 1212.51489, -1286.30029, 10.28400, 0.00000, 0.00000, 10.00000);
newbobject[10] = CreateDynamicObject(12814, 1201.08630, -1290.55200, -2.68000, 0.00000, 90.00000, -90.00000);
newbobject[11] = CreateDynamicObject(6964, 1200.30432, -1298.27234, 6.97740, 0.00000, 0.00000, 0.00000);
newbobject[12] = CreateDynamicObject(6964, 1166.39502, -1344.18201, 7.97740, 0.00000, 0.00000, 0.00000);
newbobject[13] = CreateDynamicObject(6964, 1188.24976, -1299.51782, 6.97740, 0.00000, 0.00000, 0.00000);
newbobject[14] = CreateDynamicObject(6964, 1209.33240, -1291.37061, 6.95740, 0.00000, 0.00000, 0.00000);
newbobject[15] = CreateDynamicObject(12814, 1185.26257, -1297.62610, -2.46000, 0.00000, 90.00000, 0.00000);
newbobject[16] = CreateDynamicObject(898, 1186.93066, -1303.33435, 6.63000, 0.00000, 0.00000, 0.00000);
newbobject[17] = CreateDynamicObject(898, 1193.00439, -1303.66064, 6.63000, 0.00000, 0.00000, 0.00000);
newbobject[18] = CreateDynamicObject(898, 1202.46216, -1304.24719, 5.21000, 0.00000, 0.00000, 0.00000);
newbobject[21] = CreateDynamicObject(12814, 1195.16504, -1385.11707, -2.44000, 0.00000, 90.00000, 90.00000);
newbobject[22] = CreateDynamicObject(6099, 1206.86633, -1449.62219, 25.00000, 0.00000, -30.00000, 0.00000);
newbobject[23] = CreateDynamicObject(12814, 1219.18018, -1450.85120, 12.33690, 0.00000, 0.00000, 0.00000);
newbobject[24] = CreateDynamicObject(9530, 1203.60461, -1421.85522, 5.10000, 0.00000, 0.00000, 150.00000);
newbobject[25] = CreateDynamicObject(898, 1219.04773, -1334.77759, 15.00000, 0.00000, 0.00000, 0.00000);
newbobject[26] = CreateDynamicObject(898, 1206.73108, -1333.86865, 13.96000, 0.00000, 0.00000, 0.00000);
newbobject[27] = CreateDynamicObject(898, 1195.59912, -1331.54797, 13.96000, 0.00000, 0.00000, 0.00000);
newbobject[28] = CreateDynamicObject(898, 1228.34094, -1340.08496, 15.00000, 0.00000, 0.00000, 0.00000);
newbobject[29] = CreateDynamicObject(898, 1242.13196, -1344.36804, 15.00000, 0.00000, 0.00000, 0.00000);
newbobject[30] = CreateDynamicObject(898, 1215.15173, -1490.47986, 15.00000, 0.00000, 0.00000, 0.00000);
newbobject[31] = CreateDynamicObject(898, 1222.99451, -1482.21497, 15.00000, 0.00000, 0.00000, 0.00000);
return 1;
}

stock destroyoldobject()
{
new playerid;
RemoveBuildingForPlayer(playerid, 6109, 1219.8984, -1449.4375, 29.3125, 0.25);
RemoveBuildingForPlayer(playerid, 6195, 1236.5234, -1488.1641, 40.6875, 0.25);
RemoveBuildingForPlayer(playerid, 6099, 1219.8984, -1449.4375, 29.3125, 0.25);
RemoveBuildingForPlayer(playerid, 5919, 1200.9063, -1337.9922, 12.3984, 0.25);
RemoveBuildingForPlayer(playerid, 1297, 1190.7734, -1383.2734, 15.9453, 0.25);
RemoveBuildingForPlayer(playerid, 1297, 1190.7734, -1350.4141, 15.9453, 0.25);
RemoveBuildingForPlayer(playerid, 1297, 1210.8047, -1367.3828, 15.7734, 0.25);
RemoveBuildingForPlayer(playerid, 1297, 1190.7734, -1320.8594, 15.9453, 0.25);
RemoveBuildingForPlayer(playerid, 5794, 1200.9063, -1337.9922, 12.3984, 0.25);
RemoveBuildingForPlayer(playerid, 1297, 1210.8047, -1337.8359, 15.7734, 0.25);
RemoveBuildingForPlayer(playerid, 1297, 1190.7734, -1299.7422, 15.9453, 0.25);
RemoveBuildingForPlayer(playerid, 1297, 1210.8047, -1304.9688, 15.7734, 0.25);
return 1;
}


Re: Help [+rep] - Spartaaaaa - 10.08.2014

Update streamer plugin and recompie script


Re: Help [+rep] - [XST]O_x - 10.08.2014

pawn Код:
stock destroyoldobject(playerid)
{
RemoveBuildingForPlayer(playerid, 6109, 1219.8984, -1449.4375, 29.3125, 0.25);
RemoveBuildingForPlayer(playerid, 6195, 1236.5234, -1488.1641, 40.6875, 0.25);
RemoveBuildingForPlayer(playerid, 6099, 1219.8984, -1449.4375, 29.3125, 0.25);
RemoveBuildingForPlayer(playerid, 5919, 1200.9063, -1337.9922, 12.3984, 0.25);
RemoveBuildingForPlayer(playerid, 1297, 1190.7734, -1383.2734, 15.9453, 0.25);
RemoveBuildingForPlayer(playerid, 1297, 1190.7734, -1350.4141, 15.9453, 0.25);
RemoveBuildingForPlayer(playerid, 1297, 1210.8047, -1367.3828, 15.7734, 0.25);
RemoveBuildingForPlayer(playerid, 1297, 1190.7734, -1320.8594, 15.9453, 0.25);
RemoveBuildingForPlayer(playerid, 5794, 1200.9063, -1337.9922, 12.3984, 0.25);
RemoveBuildingForPlayer(playerid, 1297, 1210.8047, -1337.8359, 15.7734, 0.25);
RemoveBuildingForPlayer(playerid, 1297, 1190.7734, -1299.7422, 15.9453, 0.25);
RemoveBuildingForPlayer(playerid, 1297, 1210.8047, -1304.9688, 15.7734, 0.25);
return 1;
}



Re: Help [+rep] - ScorpiusMalfoy - 10.08.2014

forget, im added streamer plugin in my base gamemode for createdynamibobject, but when test in game, they make a crash. So what can i do for fix that


Re: Help [+rep] - ScorpiusMalfoy - 10.08.2014

anyone ?


Re: Help [+rep] - Stanford - 10.08.2014

Did you recompile your gamemode and did you add streamer in plugins in server.cfg?


Re: Help [+rep] - ScorpiusMalfoy - 10.08.2014

yes im added streamer plugins in server.cfg but now i try to fix they can't work. Crash is fixed but Funtion create object can't not working


Re: Help [+rep] - dirigent00 - 10.08.2014

Where you use this stock?