How to add mapping to server?
#1

Can someone teach me how to add some mapping to the server please? I need to add some now?
Reply
#2

Place your CreateObject/CreateDynamicObject/etc codes under
pawn Код:
public OnGameModeInit
or
pawn Код:
public OnFilterScriptInit
RemoveBuildingForPlayer codes go under
pawn Код:
public OnPlayerConnect(playerid)
Reply
#3

When i do that it says 'Pawno Library has stopped working' ? And it crashes.. Help!?
Reply
#4

https://sampforum.blast.hk/showthread.php?tid=276499
Reply
#5

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)