How to add mapping to server? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Server (
https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (
https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: How to add mapping to server? (
/showthread.php?tid=519290)
How to add mapping to server? -
Jigsaw123 - 13.06.2014
Can someone teach me how to add some mapping to the server please? I need to add some now?
Re: How to add mapping to server? -
Dignity - 13.06.2014
Place your CreateObject/CreateDynamicObject/etc codes under
or
pawn Код:
public OnFilterScriptInit
RemoveBuildingForPlayer codes go under
pawn Код:
public OnPlayerConnect(playerid)
Re: How to add mapping to server? -
Jigsaw123 - 13.06.2014
When i do that it says 'Pawno Library has stopped working' ? And it crashes.. Help!?
Re: How to add mapping to server? -
Dignity - 13.06.2014
https://sampforum.blast.hk/showthread.php?tid=276499
Re: How to add mapping to server? -
Jay_Dixon - 13.06.2014
Here, use this, designate one object as FirstObject, same for LastObject, That'll destroy all the objects when you unload the FS. Mapping goes under OnFilterScriptInit. It's a good idea to put it in a FS, then you don't have to restart the server to add mapping
pawn Код:
public OnFilterScriptExit() {
for(new o = FirstObject; o <= LastObject; o++) {
DestroyDynamicObject(o);
}
return 1;
}
stock Float:GetDistance( Float: x1, Float: y1, Float: z1, Float: x2, Float: y2, Float: z2 ) {
new Float:d;
d += floatpower(x1-x2, 2.0);
d += floatpower(y1-y2, 2.0);
d += floatpower(z1-z2, 2.0);
d = floatsqroot(d);
return d;
}