SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 10/08/2014, 04:27 AM   #1
ScorpiusMalfoy
Big Clucker
 
Join Date: May 2014
Posts: 68
Reputation: 0
Default Help [+rep]

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;
}
ScorpiusMalfoy is offline   Reply With Quote
Old 10/08/2014, 04:28 AM   #2
Spartaaaaa
Huge Clucker
 
Spartaaaaa's Avatar
 
Join Date: May 2014
Location: Puma™
Posts: 262
Reputation: 16
Default Re: Help [+rep]

Update streamer plugin and recompie script
Spartaaaaa is offline   Reply With Quote
Old 10/08/2014, 04:28 AM   #3
[XST]O_x
High-roller
 
[XST]O_x's Avatar
 
Join Date: Aug 2009
Posts: 1,960
Reputation: 94
Default Re: Help [+rep]

pawn Code:
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;
}
[XST]O_x is offline   Reply With Quote
Old 10/08/2014, 04:30 AM   #4
ScorpiusMalfoy
Big Clucker
 
Join Date: May 2014
Posts: 68
Reputation: 0
Default Re: Help [+rep]

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
ScorpiusMalfoy is offline   Reply With Quote
Old 10/08/2014, 05:02 AM   #5
ScorpiusMalfoy
Big Clucker
 
Join Date: May 2014
Posts: 68
Reputation: 0
Default Re: Help [+rep]

anyone ?
ScorpiusMalfoy is offline   Reply With Quote
Old 10/08/2014, 09:38 AM   #6
Stanford
Gangsta
 
Stanford's Avatar
 
Join Date: Feb 2012
Posts: 983
Reputation: 84
Default Re: Help [+rep]

Did you recompile your gamemode and did you add streamer in plugins in server.cfg?
__________________
******: "That code compiles perfectly, but I can tell you now it won't make me a cup of tea."

******: "I've said this before. People think that MySQL is some simple plug-and-play magic bullet that you can use to just make your mode instantly better. They don't realise that the "L" in "SQL" means "language". So instead of programming PAWN, and using a bit of this mystery thing, you are now programming in two languages at once. If you spend months learning PAWN, you should spend the same time learning SQL, if not more - it is probably the more complex of the two languages, and not something that just gets bolted on to the side."
Stanford is offline   Reply With Quote
Old 10/08/2014, 02:26 PM   #7
ScorpiusMalfoy
Big Clucker
 
Join Date: May 2014
Posts: 68
Reputation: 0
Default Re: Help [+rep]

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
ScorpiusMalfoy is offline   Reply With Quote
Old 10/08/2014, 02:30 PM   #8
dirigent00
Big Clucker
 
Join Date: Jul 2014
Posts: 72
Reputation: 1
Default Re: Help [+rep]

Where you use this stock?
dirigent00 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 05:17 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.