Stop players surfing specific objects?
#8

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


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)