Stop players surfing specific objects?
#9

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Using only the loop will fail. In the code you posted above, you store the objectid into ObjectInfo[object][oObject].

Also you use destroy a dynamic object and then you assign to that variable the objectid using CreateObject (which is not dynamic).

Last, I'm not sure if GetPlayerSurfingObjectID will return correct objectid if the object was created with CreateDynamicObject (per-player object). In case it does, this may work:
pawn Код:
new surf_obj = GetPlayerSurfingObjectID(playerid);
for(new object = 0; object < sizeof(ObjectInfo) object++)
{
    if(surf_object != INVALID_OBJECT_ID && surf_object == ObjectInfo[object][oObject])
    {
        // re-set the player's position
        break;
    }
}
The reason I destroy the dynamic object and create an ordinary createobject is because the GUI editor of objects does not work sufficiently with dynamic objects. I've tried and it's not worked. My code works fine any way that's off topic. How can I call what I just asked in the post above I edited. That will work fine if I can call it some how.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)